aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/nmi_32.c7
-rw-r--r--arch/x86/kernel/traps_32.c8
-rw-r--r--include/asm-x86/nmi.h2
3 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index 69bdae555c18..bd04a28f7a5c 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -320,8 +320,6 @@ void touch_nmi_watchdog(void)
320} 320}
321EXPORT_SYMBOL(touch_nmi_watchdog); 321EXPORT_SYMBOL(touch_nmi_watchdog);
322 322
323extern void die_nmi(struct pt_regs *, const char *msg);
324
325notrace __kprobes int 323notrace __kprobes int
326nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) 324nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
327{ 325{
@@ -375,7 +373,8 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
375 /* 373 /*
376 * die_nmi will return ONLY if NOTIFY_STOP happens.. 374 * die_nmi will return ONLY if NOTIFY_STOP happens..
377 */ 375 */
378 die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP"); 376 die_nmi("BUG: NMI Watchdog detected LOCKUP",
377 regs, 0);
379 } else { 378 } else {
380 __get_cpu_var(last_irq_sum) = sum; 379 __get_cpu_var(last_irq_sum) = sum;
381 local_set(&__get_cpu_var(alert_counter), 0); 380 local_set(&__get_cpu_var(alert_counter), 0);
@@ -406,7 +405,7 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
406 char buf[64]; 405 char buf[64];
407 406
408 sprintf(buf, "NMI received for unknown reason %02x\n", reason); 407 sprintf(buf, "NMI received for unknown reason %02x\n", reason);
409 die_nmi(regs, buf); 408 die_nmi(buf, regs, 0);
410 return 0; 409 return 0;
411} 410}
412 411
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
756static DEFINE_SPINLOCK(nmi_print_lock); 756static DEFINE_SPINLOCK(nmi_print_lock);
757 757
758void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg) 758void 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);
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
index 8455bf36d8df..7cd5b6a88138 100644
--- a/include/asm-x86/nmi.h
+++ b/include/asm-x86/nmi.h
@@ -38,12 +38,12 @@ static inline void unset_nmi_pm_callback(struct pm_dev *dev)
38 38
39#ifdef CONFIG_X86_64 39#ifdef CONFIG_X86_64
40extern void default_do_nmi(struct pt_regs *); 40extern void default_do_nmi(struct pt_regs *);
41extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
42extern void nmi_watchdog_default(void); 41extern void nmi_watchdog_default(void);
43#else 42#else
44#define nmi_watchdog_default() do {} while (0) 43#define nmi_watchdog_default() do {} while (0)
45#endif 44#endif
46 45
46extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
47extern int check_nmi_watchdog(void); 47extern int check_nmi_watchdog(void);
48extern int nmi_watchdog_enabled; 48extern int nmi_watchdog_enabled;
49extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); 49extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);