]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.xen/xen3-panic-on-io-nmi.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.xen / xen3-panic-on-io-nmi.diff
CommitLineData
6a930a95
BS
1From: Kurt Garloff <garloff@suse.de>
2Subject: [PATCH] X86: sysctl to allow panic on IOCK NMI error
3References: bnc427979
4
5This patch introduces a sysctl /proc/sys/kernel/panic_on_io_nmi.,
6which defaults to 0 (off).
7When enabled, the kernel panics when the kernel receives an NMI
8caused by an IO error.
9
10The IO error triggered NMI indicates a serious system condition,
11which could result in IO data corruption. Rather than contiuing,
12panicing and dumping might be a better choice, so one can figure
13out what's causing the IO error.
14This could be especially important to companies running IO intensive
15applications where corruption must be avoided, e.g. a banks databases.
16
17
18Signed-off-by: Roberto Angelino <robertangelino@gmail.com>
19
20
21Automatically created from "patches.suse/panic-on-io-nmi.diff" by xen-port-patches.py
22
23Index: head-2008-11-25/arch/x86/kernel/traps_32-xen.c
24===================================================================
25--- head-2008-11-25.orig/arch/x86/kernel/traps_32-xen.c 2008-11-25 12:57:05.000000000 +0100
26+++ head-2008-11-25/arch/x86/kernel/traps_32-xen.c 2008-11-25 13:13:12.000000000 +0100
27@@ -83,6 +83,7 @@ gate_desc idt_table[256]
28 #endif
29
30 int panic_on_unrecovered_nmi;
31+int panic_on_io_nmi;
32 int kstack_depth_to_print = 24;
33 static unsigned int code_bytes = 64;
34 static int ignore_nmis;
35@@ -670,6 +671,9 @@ io_check_error(unsigned char reason, str
36 printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
37 show_registers(regs);
38
39+ if (panic_on_io_nmi)
40+ panic("NMI IOCK error: Not continuing");
41+
42 /* Re-enable the IOCK line, wait for a few seconds */
43 clear_io_check_error(reason);
44 }
45Index: head-2008-11-25/arch/x86/kernel/traps_64-xen.c
46===================================================================
47--- head-2008-11-25.orig/arch/x86/kernel/traps_64-xen.c 2008-11-25 12:57:05.000000000 +0100
48+++ head-2008-11-25/arch/x86/kernel/traps_64-xen.c 2008-11-25 13:13:12.000000000 +0100
49@@ -56,6 +56,7 @@
50 #include <mach_traps.h>
51
52 int panic_on_unrecovered_nmi;
53+int panic_on_io_nmi;
54 int kstack_depth_to_print = 12;
55 static unsigned int code_bytes = 64;
56 static int ignore_nmis;
57@@ -772,6 +773,9 @@ io_check_error(unsigned char reason, str
58 printk("NMI: IOCK error (debug interrupt?)\n");
59 show_registers(regs);
60
61+ if (panic_on_io_nmi)
62+ panic("NMI IOCK error: Not continuing");
63+
64 /* Re-enable the IOCK line, wait for a few seconds */
65 clear_io_check_error(reason);
66 }