Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / x86_64 / kernel / mce_intel.c
index 4db9a64..8f533d2 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/msr.h>
 #include <asm/mce.h>
 #include <asm/hw_irq.h>
+#include <asm/idle.h>
 
 static DEFINE_PER_CPU(unsigned long, next_check);
 
@@ -19,6 +20,7 @@ asmlinkage void smp_thermal_interrupt(void)
 
        ack_APIC_irq();
 
+       exit_idle();
        irq_enter();
        if (time_before(jiffies, __get_cpu_var(next_check)))
                goto done;
@@ -42,7 +44,7 @@ done:
        irq_exit();
 }
 
-static void __init intel_init_thermal(struct cpuinfo_x86 *c)
+static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c)
 {
        u32 l, h;
        int tm2 = 0;
@@ -78,7 +80,7 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c)
 
        h = THERMAL_APIC_VECTOR;
        h |= (APIC_DM_FIXED | APIC_LVT_MASKED);
-       apic_write_around(APIC_LVTTHMR, h);
+       apic_write(APIC_LVTTHMR, h);
 
        rdmsr(MSR_IA32_THERM_INTERRUPT, l, h);
        wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h);
@@ -87,13 +89,13 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c)
        wrmsr(MSR_IA32_MISC_ENABLE, l | (1 << 3), h);
 
        l = apic_read(APIC_LVTTHMR);
-       apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
+       apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
        printk(KERN_INFO "CPU%d: Thermal monitoring enabled (%s)\n",
                cpu, tm2 ? "TM2" : "TM1");
        return;
 }
 
-void __init mce_intel_feature_init(struct cpuinfo_x86 *c)
+void __cpuinit mce_intel_feature_init(struct cpuinfo_x86 *c)
 {
        intel_init_thermal(c);
 }