1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
Subject: Separate out clearing of NMI I/O check error
From: http://xenbits.xensource.com/xen-3.1-testing.hg (tip 15042)
Patch-mainline: obsolete
Acked-by: jbeulich@novell.com
---
arch/i386/kernel/traps.c | 9 +--------
include/asm-i386/mach-default/mach_traps.h | 12 ++++++++++++
2 files changed, 13 insertions(+), 8 deletions(-)
--- a/arch/i386/kernel/traps.c 2007-08-27 14:01:24.000000000 -0400
+++ b/arch/i386/kernel/traps.c 2007-08-27 14:01:24.000000000 -0400
@@ -656,18 +656,11 @@ mem_parity_error(unsigned char reason, s
static __kprobes void
io_check_error(unsigned char reason, struct pt_regs * regs)
{
- unsigned long i;
-
printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
show_registers(regs);
/* Re-enable the IOCK line, wait for a few seconds */
- reason = (reason & 0xf) | 8;
- outb(reason, 0x61);
- i = 2000;
- while (--i) udelay(1000);
- reason &= ~8;
- outb(reason, 0x61);
+ clear_io_check_error(reason);
}
static __kprobes void
--- a/include/asm-i386/mach-default/mach_traps.h 2007-08-27 12:09:26.000000000 -0400
+++ b/include/asm-i386/mach-default/mach_traps.h 2007-08-27 14:01:24.000000000 -0400
@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
outb(reason, 0x61);
}
+static inline void clear_io_check_error(unsigned char reason)
+{
+ unsigned long i;
+
+ reason = (reason & 0xf) | 8;
+ outb(reason, 0x61);
+ i = 2000;
+ while (--i) udelay(1000);
+ reason &= ~8;
+ outb(reason, 0x61);
+}
+
static inline unsigned char get_nmi_reason(void)
{
return inb(0x61);
|