Re: [cleanup] do_general_protection doesn't disable irq

From: Brian Gerst (bgerst_at_quark.didntduck.org)
Date: 07/30/04

  • Next message: Benjamin Herrenschmidt: "[PATCH] ppc64: fix memcpy_to/from_io"
    Date:	Fri, 30 Jul 2004 00:22:05 -0400
    To: Andrea Arcangeli <andrea@suse.de>
    
    

    Andrea Arcangeli wrote:
    > A trap gate shouldn't affect the irq status at all.
    >
    > This should be a valid cleanup that removes a slightly confusing noop:
    >
    > Index: linux-2.5/arch/i386/kernel/traps.c
    > ===================================================================
    > RCS file: /home/andrea/crypto/cvs/linux-2.5/arch/i386/kernel/traps.c,v
    > retrieving revision 1.77
    > diff -u -p -r1.77 traps.c
    > --- linux-2.5/arch/i386/kernel/traps.c 13 Jul 2004 18:02:33 -0000 1.77
    > +++ linux-2.5/arch/i386/kernel/traps.c 30 Jul 2004 02:44:23 -0000
    > @@ -431,9 +431,6 @@ DO_ERROR_INFO(17, SIGBUS, "alignment che
    >
    > asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
    > {
    > - if (regs->eflags & X86_EFLAGS_IF)
    > - local_irq_enable();
    > -
    > if (regs->eflags & VM_MASK)
    > goto gp_in_vm86;
    >
    >
    > Thanks to Karsten for noticing a trap gate doesn't actually enable irq
    > by default either (offtopic issue with the above patch, but while
    > reading the 2.6 code I found the above bit which just confused me more
    > since it's a noop, either that or you meant to use set_intr_gate, not
    > set_trap_gate on the do_general_protection handler, but it seems not
    > needed to use a trap gate since a trap gate shouldn't enable irqs by
    > default). Please correct me if wrong.

    This is there for vm86 mode. See http://tinyurl.com/3m5nr

    --
    				Brian Gerst
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Benjamin Herrenschmidt: "[PATCH] ppc64: fix memcpy_to/from_io"

    Relevant Pages