diff options
author | Don Zickus <dzickus@redhat.com> | 2010-02-05 21:47:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-08 02:29:02 -0500 |
commit | e40b17208b6805be50ffe891878662b6076206b9 (patch) | |
tree | 69792633302099f5e0cfdba7e283f29710e8beb1 /arch/x86/kernel/traps.c | |
parent | 076dc4a65a6d99a16979e2c7917e669fb8c91ee5 (diff) |
x86: Move notify_die from nmi.c to traps.c
In order to handle a new nmi_watchdog approach, I need to move
the notify_die() routine out of nmi_watchdog_tick() and into
default_do_nmi(). This lets me easily swap out the old
nmi_watchdog with the new one with just a config change.
The change probably makes sense from a high level perspective
because the nmi_watchdog shouldn't be handling notify_die
routines anyway. However, this move does change the semantics a
little bit. Instead of checking on every nmi interrupt if the
cpus are stuck, only check them on the nmi_watchdog interrupts.
v2: Move notify_die call into #idef block
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: gorcunov@gmail.com
Cc: aris@redhat.com
Cc: peterz@infradead.org
LKML-Reference: <1265424425-31562-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 1168e4454188..51ef893ffa65 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -400,7 +400,12 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs) | |||
400 | if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT) | 400 | if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT) |
401 | == NOTIFY_STOP) | 401 | == NOTIFY_STOP) |
402 | return; | 402 | return; |
403 | |||
403 | #ifdef CONFIG_X86_LOCAL_APIC | 404 | #ifdef CONFIG_X86_LOCAL_APIC |
405 | if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) | ||
406 | == NOTIFY_STOP) | ||
407 | return; | ||
408 | |||
404 | /* | 409 | /* |
405 | * Ok, so this is none of the documented NMI sources, | 410 | * Ok, so this is none of the documented NMI sources, |
406 | * so it must be the NMI watchdog. | 411 | * so it must be the NMI watchdog. |