aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/apic.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 2f69e3b184f6..8d7df7478d84 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2270,6 +2270,7 @@ static struct {
2270 unsigned int apic_tmict; 2270 unsigned int apic_tmict;
2271 unsigned int apic_tdcr; 2271 unsigned int apic_tdcr;
2272 unsigned int apic_thmr; 2272 unsigned int apic_thmr;
2273 unsigned int apic_cmci;
2273} apic_pm_state; 2274} apic_pm_state;
2274 2275
2275static int lapic_suspend(void) 2276static int lapic_suspend(void)
@@ -2299,6 +2300,10 @@ static int lapic_suspend(void)
2299 if (maxlvt >= 5) 2300 if (maxlvt >= 5)
2300 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); 2301 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
2301#endif 2302#endif
2303#ifdef CONFIG_X86_MCE_INTEL
2304 if (maxlvt >= 6)
2305 apic_pm_state.apic_cmci = apic_read(APIC_LVTCMCI);
2306#endif
2302 2307
2303 local_irq_save(flags); 2308 local_irq_save(flags);
2304 disable_local_APIC(); 2309 disable_local_APIC();
@@ -2355,10 +2360,14 @@ static void lapic_resume(void)
2355 apic_write(APIC_SPIV, apic_pm_state.apic_spiv); 2360 apic_write(APIC_SPIV, apic_pm_state.apic_spiv);
2356 apic_write(APIC_LVT0, apic_pm_state.apic_lvt0); 2361 apic_write(APIC_LVT0, apic_pm_state.apic_lvt0);
2357 apic_write(APIC_LVT1, apic_pm_state.apic_lvt1); 2362 apic_write(APIC_LVT1, apic_pm_state.apic_lvt1);
2358#if defined(CONFIG_X86_MCE_INTEL) 2363#ifdef CONFIG_X86_THERMAL_VECTOR
2359 if (maxlvt >= 5) 2364 if (maxlvt >= 5)
2360 apic_write(APIC_LVTTHMR, apic_pm_state.apic_thmr); 2365 apic_write(APIC_LVTTHMR, apic_pm_state.apic_thmr);
2361#endif 2366#endif
2367#ifdef CONFIG_X86_MCE_INTEL
2368 if (maxlvt >= 6)
2369 apic_write(APIC_LVTCMCI, apic_pm_state.apic_cmci);
2370#endif
2362 if (maxlvt >= 4) 2371 if (maxlvt >= 4)
2363 apic_write(APIC_LVTPC, apic_pm_state.apic_lvtpc); 2372 apic_write(APIC_LVTPC, apic_pm_state.apic_lvtpc);
2364 apic_write(APIC_LVTT, apic_pm_state.apic_lvtt); 2373 apic_write(APIC_LVTT, apic_pm_state.apic_lvtt);