diff options
author | Don Zickus <dzickus@redhat.com> | 2011-01-06 16:18:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-07 09:08:53 -0500 |
commit | c410b8307702c1e1f35be3fd868ad18e4ba0410f (patch) | |
tree | f81443153309c5d144ec1d163c089cc912c3e201 /arch/x86/kernel/traps.c | |
parent | 166d751479c6d4e5b17dfc1f204a9c4397c9b3f1 (diff) |
x86, NMI: Remove DIE_NMI_IPI
With priorities in place and no one really understanding the difference between
DIE_NMI and DIE_NMI_IPI, just remove DIE_NMI_IPI and convert everyone to DIE_NMI.
This also simplifies default_do_nmi() a little bit. Instead of calling the
die_notifier in both the if and else part, just pull it out and call it before
the if-statement. This has the side benefit of avoiding a call to the ioport
to see if there is an external NMI sitting around until after the (more frequent)
internal NMIs are dealt with.
Patch-Inspired-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1294348732-15030-5-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 | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index c7fd1cea0374..23f6ac05d04c 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -394,6 +394,14 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs) | |||
394 | unsigned char reason = 0; | 394 | unsigned char reason = 0; |
395 | int cpu; | 395 | int cpu; |
396 | 396 | ||
397 | /* | ||
398 | * CPU-specific NMI must be processed before non-CPU-specific | ||
399 | * NMI, otherwise we may lose it, because the CPU-specific | ||
400 | * NMI can not be detected/processed on other CPUs. | ||
401 | */ | ||
402 | if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_STOP) | ||
403 | return; | ||
404 | |||
397 | cpu = smp_processor_id(); | 405 | cpu = smp_processor_id(); |
398 | 406 | ||
399 | /* Only the BSP gets external NMIs from the system. */ | 407 | /* Only the BSP gets external NMIs from the system. */ |
@@ -401,21 +409,10 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs) | |||
401 | reason = get_nmi_reason(); | 409 | reason = get_nmi_reason(); |
402 | 410 | ||
403 | if (!(reason & NMI_REASON_MASK)) { | 411 | if (!(reason & NMI_REASON_MASK)) { |
404 | if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT) | ||
405 | == NOTIFY_STOP) | ||
406 | return; | ||
407 | |||
408 | #ifdef CONFIG_X86_LOCAL_APIC | ||
409 | if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) | ||
410 | == NOTIFY_STOP) | ||
411 | return; | ||
412 | #endif | ||
413 | unknown_nmi_error(reason, regs); | 412 | unknown_nmi_error(reason, regs); |
414 | 413 | ||
415 | return; | 414 | return; |
416 | } | 415 | } |
417 | if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) | ||
418 | return; | ||
419 | 416 | ||
420 | /* AK: following checks seem to be broken on modern chipsets. FIXME */ | 417 | /* AK: following checks seem to be broken on modern chipsets. FIXME */ |
421 | if (reason & NMI_REASON_SERR) | 418 | if (reason & NMI_REASON_SERR) |