diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-24 11:36:31 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-25 16:32:50 -0400 |
commit | ddca03c98a7f7ad5ab09967ff52d4ed60358c896 (patch) | |
tree | d59a5c8ece8858a1436d88a10fd12e6c6cf564b2 /arch/x86/kernel/traps_32.c | |
parent | 2e4db9d2c5db9c9dd3e1d1ec3263bc4a990ff8df (diff) |
x86: nmi - unify die_nmi() interface
By slightly changing 32bit mode die_nmi() we may unify the
interface and make it common for both (32/64bit) modes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: hpa@zytor.com
Cc: mingo@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r-- | arch/x86/kernel/traps_32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index bde6f63e15d5..f31e6651fa6f 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -755,9 +755,9 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs) | |||
755 | 755 | ||
756 | static DEFINE_SPINLOCK(nmi_print_lock); | 756 | static DEFINE_SPINLOCK(nmi_print_lock); |
757 | 757 | ||
758 | void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg) | 758 | void notrace __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic) |
759 | { | 759 | { |
760 | if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP) | 760 | if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) == NOTIFY_STOP) |
761 | return; | 761 | return; |
762 | 762 | ||
763 | spin_lock(&nmi_print_lock); | 763 | spin_lock(&nmi_print_lock); |
@@ -766,10 +766,12 @@ void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg) | |||
766 | * to get a message out: | 766 | * to get a message out: |
767 | */ | 767 | */ |
768 | bust_spinlocks(1); | 768 | bust_spinlocks(1); |
769 | printk(KERN_EMERG "%s", msg); | 769 | printk(KERN_EMERG "%s", str); |
770 | printk(" on CPU%d, ip %08lx, registers:\n", | 770 | printk(" on CPU%d, ip %08lx, registers:\n", |
771 | smp_processor_id(), regs->ip); | 771 | smp_processor_id(), regs->ip); |
772 | show_registers(regs); | 772 | show_registers(regs); |
773 | if (do_panic) | ||
774 | panic("Non maskable interrupt"); | ||
773 | console_silent(); | 775 | console_silent(); |
774 | spin_unlock(&nmi_print_lock); | 776 | spin_unlock(&nmi_print_lock); |
775 | bust_spinlocks(0); | 777 | bust_spinlocks(0); |