public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [cleanup] do_general_protection doesn't disable irq
Date: Fri, 30 Jul 2004 04:53:49 +0200	[thread overview]
Message-ID: <20040730025349.GE30369@dualathlon.random> (raw)

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.

thanks.

             reply	other threads:[~2004-07-30  2:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30  2:53 Andrea Arcangeli [this message]
2004-07-30  4:22 ` [cleanup] do_general_protection doesn't disable irq Brian Gerst
2004-07-30  4:45   ` Andrea Arcangeli
2004-07-30 13:58   ` Karsten Keil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040730025349.GE30369@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox