[patch 02/11] x86: nmi - die_nmi() output message unification

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cyrill Gorcunov
Date: Saturday, May 24, 2008 - 8:36 am

Make 64bit die_nmi() to produce the same message as 32bit mode has

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/nmi_64.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi_64.c	2008-05-24 12:07:40.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi_64.c	2008-05-24 12:25:57.000000000 +0400
@@ -358,8 +358,8 @@ nmi_watchdog_tick(struct pt_regs *regs, 
 		 */
 		local_inc(&__get_cpu_var(alert_counter));
 		if (local_read(&__get_cpu_var(alert_counter)) == 5*nmi_hz)
-			die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs,
-				panic_on_timeout);
+			die_nmi("NMI Watchdog detected LOCKUP",
+				regs, panic_on_timeout);
 	} else {
 		__get_cpu_var(last_irq_sum) = sum;
 		local_set(&__get_cpu_var(alert_counter), 0);
Index: linux-2.6.git/arch/x86/kernel/traps_64.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_64.c	2008-05-24 12:07:40.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/traps_64.c	2008-05-24 12:25:11.000000000 +0400
@@ -614,7 +614,9 @@ die_nmi(char *str, struct pt_regs *regs,
 	 * We are in trouble anyway, lets at least try
 	 * to get a message out.
 	 */
-	printk(str, smp_processor_id());
+	printk(KERN_EMERG "%s", str);
+	printk(" on CPU%d, ip %08lx, registers:\n",
+		smp_processor_id(), regs->ip);
 	show_registers(regs);
 	if (kexec_should_crash(current))
 		crash_kexec(regs);

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 02/11] x86: nmi - die_nmi() output message unification, Cyrill Gorcunov, (Sat May 24, 8:36 am)