Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'x86/ras' into x86/core, to fix conflicts

Conflicts:
arch/x86/include/asm/irq_vectors.h

Signed-off-by: Ingo Molnar <mingo@kernel.org>

+271 -52
+3
Documentation/x86/x86_64/boot-options.txt
··· 31 31 (e.g. BIOS or hardware monitoring applications), conflicting 32 32 with OS's error handling, and you cannot deactivate the agent, 33 33 then this option will be a help. 34 + mce=no_lmce 35 + Do not opt-in to Local MCE delivery. Use legacy method 36 + to broadcast MCEs. 34 37 mce=bootlog 35 38 Enable logging of machine checks left over from booting. 36 39 Disabled by default on AMD because some BIOS leave bogus ones.
+3
arch/x86/include/asm/entry_arch.h
··· 52 52 BUILD_INTERRUPT(threshold_interrupt,THRESHOLD_APIC_VECTOR) 53 53 #endif 54 54 55 + #ifdef CONFIG_X86_MCE_AMD 56 + BUILD_INTERRUPT(deferred_error_interrupt, DEFERRED_ERROR_VECTOR) 57 + #endif 55 58 #endif
+3
arch/x86/include/asm/hardirq.h
··· 34 34 #ifdef CONFIG_X86_MCE_THRESHOLD 35 35 unsigned int irq_threshold_count; 36 36 #endif 37 + #ifdef CONFIG_X86_MCE_AMD 38 + unsigned int irq_deferred_error_count; 39 + #endif 37 40 #if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN) 38 41 unsigned int irq_hv_callback_count; 39 42 #endif
+2
arch/x86/include/asm/hw_irq.h
··· 40 40 extern asmlinkage void irq_move_cleanup_interrupt(void); 41 41 extern asmlinkage void reboot_interrupt(void); 42 42 extern asmlinkage void threshold_interrupt(void); 43 + extern asmlinkage void deferred_error_interrupt(void); 43 44 44 45 extern asmlinkage void call_function_interrupt(void); 45 46 extern asmlinkage void call_function_single_interrupt(void); ··· 55 54 extern void trace_thermal_interrupt(void); 56 55 extern void trace_reschedule_interrupt(void); 57 56 extern void trace_threshold_interrupt(void); 57 + extern void trace_deferred_error_interrupt(void); 58 58 extern void trace_call_function_interrupt(void); 59 59 extern void trace_call_function_single_interrupt(void); 60 60 #define trace_irq_move_cleanup_interrupt irq_move_cleanup_interrupt
+6 -5
arch/x86/include/asm/irq_vectors.h
··· 83 83 */ 84 84 #define X86_PLATFORM_IPI_VECTOR 0xf7 85 85 86 - /* Vector for KVM to deliver posted interrupt IPI */ 87 - #ifdef CONFIG_HAVE_KVM 88 - #define POSTED_INTR_VECTOR 0xf2 89 86 #define POSTED_INTR_WAKEUP_VECTOR 0xf1 90 - #endif 91 - 92 87 /* 93 88 * IRQ work vector: 94 89 */ 95 90 #define IRQ_WORK_VECTOR 0xf6 96 91 97 92 #define UV_BAU_MESSAGE 0xf5 93 + #define DEFERRED_ERROR_VECTOR 0xf4 98 94 99 95 /* Vector on which hypervisor callbacks will be delivered */ 100 96 #define HYPERVISOR_CALLBACK_VECTOR 0xf3 97 + 98 + /* Vector for KVM to deliver posted interrupt IPI */ 99 + #ifdef CONFIG_HAVE_KVM 100 + #define POSTED_INTR_VECTOR 0xf2 101 + #endif 101 102 102 103 /* 103 104 * Local APIC timer IRQ vector is on a different priority level,
+26 -2
arch/x86/include/asm/mce.h
··· 17 17 #define MCG_EXT_CNT(c) (((c) & MCG_EXT_CNT_MASK) >> MCG_EXT_CNT_SHIFT) 18 18 #define MCG_SER_P (1ULL<<24) /* MCA recovery/new status bits */ 19 19 #define MCG_ELOG_P (1ULL<<26) /* Extended error log supported */ 20 + #define MCG_LMCE_P (1ULL<<27) /* Local machine check supported */ 20 21 21 22 /* MCG_STATUS register defines */ 22 23 #define MCG_STATUS_RIPV (1ULL<<0) /* restart ip valid */ 23 24 #define MCG_STATUS_EIPV (1ULL<<1) /* ip points to correct instruction */ 24 25 #define MCG_STATUS_MCIP (1ULL<<2) /* machine check in progress */ 26 + #define MCG_STATUS_LMCES (1ULL<<3) /* LMCE signaled */ 27 + 28 + /* MCG_EXT_CTL register defines */ 29 + #define MCG_EXT_CTL_LMCE_EN (1ULL<<0) /* Enable LMCE */ 25 30 26 31 /* MCi_STATUS register defines */ 27 32 #define MCI_STATUS_VAL (1ULL<<63) /* valid error */ ··· 109 104 struct mca_config { 110 105 bool dont_log_ce; 111 106 bool cmci_disabled; 107 + bool lmce_disabled; 112 108 bool ignore_ce; 113 109 bool disabled; 114 110 bool ser; ··· 123 117 }; 124 118 125 119 struct mce_vendor_flags { 126 - __u64 overflow_recov : 1, /* cpuid_ebx(80000007) */ 127 - __reserved_0 : 63; 120 + /* 121 + * overflow recovery cpuid bit indicates that overflow 122 + * conditions are not fatal 123 + */ 124 + __u64 overflow_recov : 1, 125 + 126 + /* 127 + * SUCCOR stands for S/W UnCorrectable error COntainment 128 + * and Recovery. It indicates support for data poisoning 129 + * in HW and deferred error interrupts. 130 + */ 131 + succor : 1, 132 + __reserved_0 : 62; 128 133 }; 129 134 extern struct mce_vendor_flags mce_flags; 130 135 ··· 185 168 void cmci_reenable(void); 186 169 void cmci_rediscover(void); 187 170 void cmci_recheck(void); 171 + void lmce_clear(void); 172 + void lmce_enable(void); 188 173 #else 189 174 static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { } 190 175 static inline void cmci_clear(void) {} 191 176 static inline void cmci_reenable(void) {} 192 177 static inline void cmci_rediscover(void) {} 193 178 static inline void cmci_recheck(void) {} 179 + static inline void lmce_clear(void) {} 180 + static inline void lmce_enable(void) {} 194 181 #endif 195 182 196 183 #ifdef CONFIG_X86_MCE_AMD ··· 243 222 244 223 extern void (*mce_threshold_vector)(void); 245 224 extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); 225 + 226 + /* Deferred error interrupt handler */ 227 + extern void (*deferred_error_int_vector)(void); 246 228 247 229 /* 248 230 * Thermal handler
+6
arch/x86/include/asm/trace/irq_vectors.h
··· 101 101 DEFINE_IRQ_VECTOR_EVENT(threshold_apic); 102 102 103 103 /* 104 + * deferred_error_apic - called when entering/exiting a deferred apic interrupt 105 + * vector handler 106 + */ 107 + DEFINE_IRQ_VECTOR_EVENT(deferred_error_apic); 108 + 109 + /* 104 110 * thermal_apic - called when entering/exiting a thermal apic interrupt 105 111 * vector handler 106 112 */
+2 -1
arch/x86/include/asm/traps.h
··· 108 108 void math_emulate(struct math_emu_info *); 109 109 #ifndef CONFIG_X86_32 110 110 asmlinkage void smp_thermal_interrupt(void); 111 - asmlinkage void mce_threshold_interrupt(void); 111 + asmlinkage void smp_threshold_interrupt(void); 112 + asmlinkage void smp_deferred_error_interrupt(void); 112 113 #endif 113 114 114 115 extern enum ctx_state ist_enter(struct pt_regs *regs);
+2
arch/x86/include/uapi/asm/msr-index.h
··· 56 56 #define MSR_IA32_MCG_CAP 0x00000179 57 57 #define MSR_IA32_MCG_STATUS 0x0000017a 58 58 #define MSR_IA32_MCG_CTL 0x0000017b 59 + #define MSR_IA32_MCG_EXT_CTL 0x000004d0 59 60 60 61 #define MSR_OFFCORE_RSP_0 0x000001a6 61 62 #define MSR_OFFCORE_RSP_1 0x000001a7 ··· 381 380 #define FEATURE_CONTROL_LOCKED (1<<0) 382 381 #define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1) 383 382 #define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2) 383 + #define FEATURE_CONTROL_LMCE (1<<20) 384 384 385 385 #define MSR_IA32_APICBASE 0x0000001b 386 386 #define MSR_IA32_APICBASE_BSP (1<<8)
+38 -12
arch/x86/kernel/cpu/mcheck/mce.c
··· 1050 1050 char *msg = "Unknown"; 1051 1051 u64 recover_paddr = ~0ull; 1052 1052 int flags = MF_ACTION_REQUIRED; 1053 + int lmce = 0; 1053 1054 1054 1055 prev_state = ist_enter(regs); 1055 1056 ··· 1078 1077 kill_it = 1; 1079 1078 1080 1079 /* 1081 - * Go through all the banks in exclusion of the other CPUs. 1082 - * This way we don't report duplicated events on shared banks 1083 - * because the first one to see it will clear it. 1080 + * Check if this MCE is signaled to only this logical processor 1084 1081 */ 1085 - order = mce_start(&no_way_out); 1082 + if (m.mcgstatus & MCG_STATUS_LMCES) 1083 + lmce = 1; 1084 + else { 1085 + /* 1086 + * Go through all the banks in exclusion of the other CPUs. 1087 + * This way we don't report duplicated events on shared banks 1088 + * because the first one to see it will clear it. 1089 + * If this is a Local MCE, then no need to perform rendezvous. 1090 + */ 1091 + order = mce_start(&no_way_out); 1092 + } 1093 + 1086 1094 for (i = 0; i < cfg->banks; i++) { 1087 1095 __clear_bit(i, toclear); 1088 1096 if (!test_bit(i, valid_banks)) ··· 1168 1158 * Do most of the synchronization with other CPUs. 1169 1159 * When there's any problem use only local no_way_out state. 1170 1160 */ 1171 - if (mce_end(order) < 0) 1172 - no_way_out = worst >= MCE_PANIC_SEVERITY; 1161 + if (!lmce) { 1162 + if (mce_end(order) < 0) 1163 + no_way_out = worst >= MCE_PANIC_SEVERITY; 1164 + } else { 1165 + /* 1166 + * Local MCE skipped calling mce_reign() 1167 + * If we found a fatal error, we need to panic here. 1168 + */ 1169 + if (worst >= MCE_PANIC_SEVERITY && mca_cfg.tolerant < 3) 1170 + mce_panic("Machine check from unknown source", 1171 + NULL, NULL); 1172 + } 1173 1173 1174 1174 /* 1175 1175 * At insane "tolerant" levels we take no action. Otherwise ··· 1660 1640 mce_intel_feature_init(c); 1661 1641 mce_adjust_timer = cmci_intel_adjust_timer; 1662 1642 break; 1663 - case X86_VENDOR_AMD: 1643 + 1644 + case X86_VENDOR_AMD: { 1645 + u32 ebx = cpuid_ebx(0x80000007); 1646 + 1664 1647 mce_amd_feature_init(c); 1665 - mce_flags.overflow_recov = cpuid_ebx(0x80000007) & 0x1; 1648 + mce_flags.overflow_recov = !!(ebx & BIT(0)); 1649 + mce_flags.succor = !!(ebx & BIT(1)); 1666 1650 break; 1651 + } 1652 + 1667 1653 default: 1668 1654 break; 1669 1655 } ··· 2005 1979 /* 2006 1980 * mce=off Disables machine check 2007 1981 * mce=no_cmci Disables CMCI 1982 + * mce=no_lmce Disables LMCE 2008 1983 * mce=dont_log_ce Clears corrected events silently, no log created for CEs. 2009 1984 * mce=ignore_ce Disables polling and CMCI, corrected events are not cleared. 2010 1985 * mce=TOLERANCELEVEL[,monarchtimeout] (number, see above) ··· 2029 2002 cfg->disabled = true; 2030 2003 else if (!strcmp(str, "no_cmci")) 2031 2004 cfg->cmci_disabled = true; 2005 + else if (!strcmp(str, "no_lmce")) 2006 + cfg->lmce_disabled = true; 2032 2007 else if (!strcmp(str, "dont_log_ce")) 2033 2008 cfg->dont_log_ce = true; 2034 2009 else if (!strcmp(str, "ignore_ce")) ··· 2040 2011 else if (!strcmp(str, "bios_cmci_threshold")) 2041 2012 cfg->bios_cmci_threshold = true; 2042 2013 else if (isdigit(str[0])) { 2043 - get_option(&str, &(cfg->tolerant)); 2044 - if (*str == ',') { 2045 - ++str; 2014 + if (get_option(&str, &cfg->tolerant) == 2) 2046 2015 get_option(&str, &(cfg->monarch_timeout)); 2047 - } 2048 2016 } else { 2049 2017 pr_info("mce argument %s ignored. Please use /sys\n", str); 2050 2018 return 0;
+121 -20
arch/x86/kernel/cpu/mcheck/mce_amd.c
··· 1 1 /* 2 - * (c) 2005-2012 Advanced Micro Devices, Inc. 2 + * (c) 2005-2015 Advanced Micro Devices, Inc. 3 3 * Your use of this code is subject to the terms and conditions of the 4 4 * GNU general public license version 2. See "COPYING" or 5 5 * http://www.gnu.org/licenses/gpl.html 6 6 * 7 7 * Written by Jacob Shin - AMD, Inc. 8 - * 9 8 * Maintained by: Borislav Petkov <bp@alien8.de> 10 9 * 11 - * April 2006 12 - * - added support for AMD Family 0x10 processors 13 - * May 2012 14 - * - major scrubbing 15 - * 16 - * All MC4_MISCi registers are shared between multi-cores 10 + * All MC4_MISCi registers are shared between cores on a node. 17 11 */ 18 12 #include <linux/interrupt.h> 19 13 #include <linux/notifier.h> ··· 26 32 #include <asm/idle.h> 27 33 #include <asm/mce.h> 28 34 #include <asm/msr.h> 35 + #include <asm/trace/irq_vectors.h> 29 36 30 37 #define NR_BLOCKS 9 31 38 #define THRESHOLD_MAX 0xFFF ··· 42 47 #define MASK_BLKPTR_LO 0xFF000000 43 48 #define MCG_XBLK_ADDR 0xC0000400 44 49 50 + /* Deferred error settings */ 51 + #define MSR_CU_DEF_ERR 0xC0000410 52 + #define MASK_DEF_LVTOFF 0x000000F0 53 + #define MASK_DEF_INT_TYPE 0x00000006 54 + #define DEF_LVT_OFF 0x2 55 + #define DEF_INT_TYPE_APIC 0x2 56 + 45 57 static const char * const th_names[] = { 46 58 "load_store", 47 59 "insn_fetch", ··· 62 60 static DEFINE_PER_CPU(unsigned char, bank_map); /* see which banks are on */ 63 61 64 62 static void amd_threshold_interrupt(void); 63 + static void amd_deferred_error_interrupt(void); 64 + 65 + static void default_deferred_error_interrupt(void) 66 + { 67 + pr_err("Unexpected deferred interrupt at vector %x\n", DEFERRED_ERROR_VECTOR); 68 + } 69 + void (*deferred_error_int_vector)(void) = default_deferred_error_interrupt; 65 70 66 71 /* 67 72 * CPU Initialization ··· 205 196 threshold_restart_bank(&tr); 206 197 }; 207 198 208 - static int setup_APIC_mce(int reserved, int new) 199 + static int setup_APIC_mce_threshold(int reserved, int new) 209 200 { 210 201 if (reserved < 0 && !setup_APIC_eilvt(new, THRESHOLD_APIC_VECTOR, 211 202 APIC_EILVT_MSG_FIX, 0)) 212 203 return new; 213 204 214 205 return reserved; 206 + } 207 + 208 + static int setup_APIC_deferred_error(int reserved, int new) 209 + { 210 + if (reserved < 0 && !setup_APIC_eilvt(new, DEFERRED_ERROR_VECTOR, 211 + APIC_EILVT_MSG_FIX, 0)) 212 + return new; 213 + 214 + return reserved; 215 + } 216 + 217 + static void deferred_error_interrupt_enable(struct cpuinfo_x86 *c) 218 + { 219 + u32 low = 0, high = 0; 220 + int def_offset = -1, def_new; 221 + 222 + if (rdmsr_safe(MSR_CU_DEF_ERR, &low, &high)) 223 + return; 224 + 225 + def_new = (low & MASK_DEF_LVTOFF) >> 4; 226 + if (!(low & MASK_DEF_LVTOFF)) { 227 + pr_err(FW_BUG "Your BIOS is not setting up LVT offset 0x2 for deferred error IRQs correctly.\n"); 228 + def_new = DEF_LVT_OFF; 229 + low = (low & ~MASK_DEF_LVTOFF) | (DEF_LVT_OFF << 4); 230 + } 231 + 232 + def_offset = setup_APIC_deferred_error(def_offset, def_new); 233 + if ((def_offset == def_new) && 234 + (deferred_error_int_vector != amd_deferred_error_interrupt)) 235 + deferred_error_int_vector = amd_deferred_error_interrupt; 236 + 237 + low = (low & ~MASK_DEF_INT_TYPE) | DEF_INT_TYPE_APIC; 238 + wrmsr(MSR_CU_DEF_ERR, low, high); 215 239 } 216 240 217 241 /* cpu init entry point, called from mce.c with preempt off */ ··· 294 252 295 253 b.interrupt_enable = 1; 296 254 new = (high & MASK_LVTOFF_HI) >> 20; 297 - offset = setup_APIC_mce(offset, new); 255 + offset = setup_APIC_mce_threshold(offset, new); 298 256 299 257 if ((offset == new) && 300 258 (mce_threshold_vector != amd_threshold_interrupt)) ··· 303 261 init: 304 262 mce_threshold_block_init(&b, offset); 305 263 } 264 + } 265 + 266 + if (mce_flags.succor) 267 + deferred_error_interrupt_enable(c); 268 + } 269 + 270 + static void __log_error(unsigned int bank, bool threshold_err, u64 misc) 271 + { 272 + struct mce m; 273 + u64 status; 274 + 275 + rdmsrl(MSR_IA32_MCx_STATUS(bank), status); 276 + if (!(status & MCI_STATUS_VAL)) 277 + return; 278 + 279 + mce_setup(&m); 280 + 281 + m.status = status; 282 + m.bank = bank; 283 + 284 + if (threshold_err) 285 + m.misc = misc; 286 + 287 + if (m.status & MCI_STATUS_ADDRV) 288 + rdmsrl(MSR_IA32_MCx_ADDR(bank), m.addr); 289 + 290 + mce_log(&m); 291 + wrmsrl(MSR_IA32_MCx_STATUS(bank), 0); 292 + } 293 + 294 + static inline void __smp_deferred_error_interrupt(void) 295 + { 296 + inc_irq_stat(irq_deferred_error_count); 297 + deferred_error_int_vector(); 298 + } 299 + 300 + asmlinkage __visible void smp_deferred_error_interrupt(void) 301 + { 302 + entering_irq(); 303 + __smp_deferred_error_interrupt(); 304 + exiting_ack_irq(); 305 + } 306 + 307 + asmlinkage __visible void smp_trace_deferred_error_interrupt(void) 308 + { 309 + entering_irq(); 310 + trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR); 311 + __smp_deferred_error_interrupt(); 312 + trace_deferred_error_apic_exit(DEFERRED_ERROR_VECTOR); 313 + exiting_ack_irq(); 314 + } 315 + 316 + /* APIC interrupt handler for deferred errors */ 317 + static void amd_deferred_error_interrupt(void) 318 + { 319 + u64 status; 320 + unsigned int bank; 321 + 322 + for (bank = 0; bank < mca_cfg.banks; ++bank) { 323 + rdmsrl(MSR_IA32_MCx_STATUS(bank), status); 324 + 325 + if (!(status & MCI_STATUS_VAL) || 326 + !(status & MCI_STATUS_DEFERRED)) 327 + continue; 328 + 329 + __log_error(bank, false, 0); 330 + break; 306 331 } 307 332 } 308 333 ··· 382 273 * the interrupt goes off when error_count reaches threshold_limit. 383 274 * the handler will simply log mcelog w/ software defined bank number. 384 275 */ 276 + 385 277 static void amd_threshold_interrupt(void) 386 278 { 387 279 u32 low = 0, high = 0, address = 0; 388 280 int cpu = smp_processor_id(); 389 281 unsigned int bank, block; 390 - struct mce m; 391 282 392 283 /* assume first bank caused it */ 393 284 for (bank = 0; bank < mca_cfg.banks; ++bank) { ··· 430 321 return; 431 322 432 323 log: 433 - mce_setup(&m); 434 - rdmsrl(MSR_IA32_MCx_STATUS(bank), m.status); 435 - if (!(m.status & MCI_STATUS_VAL)) 436 - return; 437 - m.misc = ((u64)high << 32) | low; 438 - m.bank = bank; 439 - mce_log(&m); 440 - 441 - wrmsrl(MSR_IA32_MCx_STATUS(bank), 0); 324 + __log_error(bank, true, ((u64)high << 32) | low); 442 325 } 443 326 444 327 /*
+44
arch/x86/kernel/cpu/mcheck/mce_intel.c
··· 91 91 return !!(cap & MCG_CMCI_P); 92 92 } 93 93 94 + static bool lmce_supported(void) 95 + { 96 + u64 tmp; 97 + 98 + if (mca_cfg.lmce_disabled) 99 + return false; 100 + 101 + rdmsrl(MSR_IA32_MCG_CAP, tmp); 102 + 103 + /* 104 + * LMCE depends on recovery support in the processor. Hence both 105 + * MCG_SER_P and MCG_LMCE_P should be present in MCG_CAP. 106 + */ 107 + if ((tmp & (MCG_SER_P | MCG_LMCE_P)) != 108 + (MCG_SER_P | MCG_LMCE_P)) 109 + return false; 110 + 111 + /* 112 + * BIOS should indicate support for LMCE by setting bit 20 in 113 + * IA32_FEATURE_CONTROL without which touching MCG_EXT_CTL will 114 + * generate a #GP fault. 115 + */ 116 + rdmsrl(MSR_IA32_FEATURE_CONTROL, tmp); 117 + if ((tmp & (FEATURE_CONTROL_LOCKED | FEATURE_CONTROL_LMCE)) == 118 + (FEATURE_CONTROL_LOCKED | FEATURE_CONTROL_LMCE)) 119 + return true; 120 + 121 + return false; 122 + } 123 + 94 124 bool mce_intel_cmci_poll(void) 95 125 { 96 126 if (__this_cpu_read(cmci_storm_state) == CMCI_STORM_NONE) ··· 435 405 cmci_recheck(); 436 406 } 437 407 408 + void intel_init_lmce(void) 409 + { 410 + u64 val; 411 + 412 + if (!lmce_supported()) 413 + return; 414 + 415 + rdmsrl(MSR_IA32_MCG_EXT_CTL, val); 416 + 417 + if (!(val & MCG_EXT_CTL_LMCE_EN)) 418 + wrmsrl(MSR_IA32_MCG_EXT_CTL, val | MCG_EXT_CTL_LMCE_EN); 419 + } 420 + 438 421 void mce_intel_feature_init(struct cpuinfo_x86 *c) 439 422 { 440 423 intel_init_thermal(c); 441 424 intel_init_cmci(); 425 + intel_init_lmce(); 442 426 }
+5
arch/x86/kernel/entry_64.S
··· 925 925 threshold_interrupt smp_threshold_interrupt 926 926 #endif 927 927 928 + #ifdef CONFIG_X86_MCE_AMD 929 + apicinterrupt DEFERRED_ERROR_VECTOR \ 930 + deferred_error_interrupt smp_deferred_error_interrupt 931 + #endif 932 + 928 933 #ifdef CONFIG_X86_THERMAL_VECTOR 929 934 apicinterrupt THERMAL_APIC_VECTOR \ 930 935 thermal_interrupt smp_thermal_interrupt
+6
arch/x86/kernel/irq.c
··· 122 122 seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count); 123 123 seq_puts(p, " Threshold APIC interrupts\n"); 124 124 #endif 125 + #ifdef CONFIG_X86_MCE_AMD 126 + seq_printf(p, "%*s: ", prec, "DFR"); 127 + for_each_online_cpu(j) 128 + seq_printf(p, "%10u ", irq_stats(j)->irq_deferred_error_count); 129 + seq_puts(p, " Deferred Error APIC interrupts\n"); 130 + #endif 125 131 #ifdef CONFIG_X86_MCE 126 132 seq_printf(p, "%*s: ", prec, "MCE"); 127 133 for_each_online_cpu(j)
+4
arch/x86/kernel/irqinit.c
··· 135 135 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 136 136 #endif 137 137 138 + #ifdef CONFIG_X86_MCE_AMD 139 + alloc_intr_gate(DEFERRED_ERROR_VECTOR, deferred_error_interrupt); 140 + #endif 141 + 138 142 #ifdef CONFIG_X86_LOCAL_APIC 139 143 /* self generated IPI for local APIC timer */ 140 144 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
-12
arch/x86/kernel/traps.c
··· 813 813 do_spurious_interrupt_bug(struct pt_regs *regs, long error_code) 814 814 { 815 815 conditional_sti(regs); 816 - #if 0 817 - /* No need to warn about this any longer. */ 818 - pr_info("Ignoring P6 Local APIC Spurious Interrupt Bug...\n"); 819 - #endif 820 - } 821 - 822 - asmlinkage __visible void __attribute__((weak)) smp_thermal_interrupt(void) 823 - { 824 - } 825 - 826 - asmlinkage __visible void __attribute__((weak)) smp_threshold_interrupt(void) 827 - { 828 816 } 829 817 830 818 /*