nmi.c (681e4a5e13c1c8315694eb4f44e0cdd84c9082d2) | nmi.c (553222f3e81f18da31b2552e18dc519715198590) |
---|---|
1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 * Copyright (C) 2011 Don Zickus Red Hat, Inc. 5 * 6 * Pentium III FXSR, SSE support 7 * Gareth Hughes <gareth@valinux.com>, May 2000 8 */ --- 40 unchanged lines hidden (view full) --- 49 { 50 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[0].lock), 51 .head = LIST_HEAD_INIT(nmi_desc[0].head), 52 }, 53 { 54 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[1].lock), 55 .head = LIST_HEAD_INIT(nmi_desc[1].head), 56 }, | 1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 * Copyright (C) 2011 Don Zickus Red Hat, Inc. 5 * 6 * Pentium III FXSR, SSE support 7 * Gareth Hughes <gareth@valinux.com>, May 2000 8 */ --- 40 unchanged lines hidden (view full) --- 49 { 50 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[0].lock), 51 .head = LIST_HEAD_INIT(nmi_desc[0].head), 52 }, 53 { 54 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[1].lock), 55 .head = LIST_HEAD_INIT(nmi_desc[1].head), 56 }, |
57 { 58 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[2].lock), 59 .head = LIST_HEAD_INIT(nmi_desc[2].head), 60 }, 61 { 62 .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[3].lock), 63 .head = LIST_HEAD_INIT(nmi_desc[3].head), 64 }, |
|
57 58}; 59 60struct nmi_stats { 61 unsigned int normal; 62 unsigned int unknown; 63 unsigned int external; 64 unsigned int swallow; --- 50 unchanged lines hidden (view full) --- 115 spin_lock_irqsave(&desc->lock, flags); 116 117 /* 118 * most handlers of type NMI_UNKNOWN never return because 119 * they just assume the NMI is theirs. Just a sanity check 120 * to manage expectations 121 */ 122 WARN_ON_ONCE(type == NMI_UNKNOWN && !list_empty(&desc->head)); | 65 66}; 67 68struct nmi_stats { 69 unsigned int normal; 70 unsigned int unknown; 71 unsigned int external; 72 unsigned int swallow; --- 50 unchanged lines hidden (view full) --- 123 spin_lock_irqsave(&desc->lock, flags); 124 125 /* 126 * most handlers of type NMI_UNKNOWN never return because 127 * they just assume the NMI is theirs. Just a sanity check 128 * to manage expectations 129 */ 130 WARN_ON_ONCE(type == NMI_UNKNOWN && !list_empty(&desc->head)); |
131 WARN_ON_ONCE(type == NMI_SERR && !list_empty(&desc->head)); 132 WARN_ON_ONCE(type == NMI_IO_CHECK && !list_empty(&desc->head)); |
|
123 124 /* 125 * some handlers need to be executed first otherwise a fake 126 * event confuses some handlers (kdump uses this flag) 127 */ 128 if (action->flags & NMI_FLAG_FIRST) 129 list_add_rcu(&action->list, &desc->head); 130 else --- 76 unchanged lines hidden (view full) --- 207 } 208} 209 210EXPORT_SYMBOL_GPL(unregister_nmi_handler); 211 212static notrace __kprobes void 213pci_serr_error(unsigned char reason, struct pt_regs *regs) 214{ | 133 134 /* 135 * some handlers need to be executed first otherwise a fake 136 * event confuses some handlers (kdump uses this flag) 137 */ 138 if (action->flags & NMI_FLAG_FIRST) 139 list_add_rcu(&action->list, &desc->head); 140 else --- 76 unchanged lines hidden (view full) --- 217 } 218} 219 220EXPORT_SYMBOL_GPL(unregister_nmi_handler); 221 222static notrace __kprobes void 223pci_serr_error(unsigned char reason, struct pt_regs *regs) 224{ |
225 /* check to see if anyone registered against these types of errors */ 226 if (nmi_handle(NMI_SERR, regs, false)) 227 return; 228 |
|
215 pr_emerg("NMI: PCI system error (SERR) for reason %02x on CPU %d.\n", 216 reason, smp_processor_id()); 217 218 /* 219 * On some machines, PCI SERR line is used to report memory 220 * errors. EDAC makes use of it. 221 */ 222#if defined(CONFIG_EDAC) --- 13 unchanged lines hidden (view full) --- 236 outb(reason, NMI_REASON_PORT); 237} 238 239static notrace __kprobes void 240io_check_error(unsigned char reason, struct pt_regs *regs) 241{ 242 unsigned long i; 243 | 229 pr_emerg("NMI: PCI system error (SERR) for reason %02x on CPU %d.\n", 230 reason, smp_processor_id()); 231 232 /* 233 * On some machines, PCI SERR line is used to report memory 234 * errors. EDAC makes use of it. 235 */ 236#if defined(CONFIG_EDAC) --- 13 unchanged lines hidden (view full) --- 250 outb(reason, NMI_REASON_PORT); 251} 252 253static notrace __kprobes void 254io_check_error(unsigned char reason, struct pt_regs *regs) 255{ 256 unsigned long i; 257 |
258 /* check to see if anyone registered against these types of errors */ 259 if (nmi_handle(NMI_IO_CHECK, regs, false)) 260 return; 261 |
|
244 pr_emerg( 245 "NMI: IOCK error (debug interrupt?) for reason %02x on CPU %d.\n", 246 reason, smp_processor_id()); 247 show_registers(regs); 248 249 if (panic_on_io_nmi) 250 panic("NMI IOCK error: Not continuing"); 251 --- 286 unchanged lines hidden --- | 262 pr_emerg( 263 "NMI: IOCK error (debug interrupt?) for reason %02x on CPU %d.\n", 264 reason, smp_processor_id()); 265 show_registers(regs); 266 267 if (panic_on_io_nmi) 268 panic("NMI IOCK error: Not continuing"); 269 --- 286 unchanged lines hidden --- |