summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2009-06-15 17:24:40 +0900
committerH. Peter Anvin <hpa@zytor.com>2009-06-16 16:56:08 -0700
commite8ce2c5ee826b3787202493effcd08d4b1e1e639 (patch)
tree45dfcd93086820963d196d88851d772d11b2f8e9 /arch/x86/kernel
parent5335612a574a45beab14193ec641ed2f45e7a523 (diff)
x86, mce: unify smp_thermal_interrupt, prepare
Let them in same shape. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_intel_64.c20
-rw-r--r--arch/x86/kernel/cpu/mcheck/p4.c10
2 files changed, 24 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
index a5232b2c4ca..922e3a482f6 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
@@ -16,6 +16,14 @@
#include <asm/idle.h>
#include <asm/therm_throt.h>
+static void unexpected_thermal_interrupt(void)
+{
+ printk(KERN_ERR "CPU%d: Unexpected LVT TMR interrupt!\n",
+ smp_processor_id());
+ add_taint(TAINT_MACHINE_CHECK);
+}
+
+/* P4/Xeon Thermal transition interrupt handler: */
static void intel_thermal_interrupt(void)
{
__u64 msr_val;
@@ -25,14 +33,22 @@ static void intel_thermal_interrupt(void)
mce_log_therm_throt_event(msr_val);
}
+/* Thermal interrupt handler for this CPU setup: */
+static void (*vendor_thermal_interrupt)(void) = unexpected_thermal_interrupt;
+
asmlinkage void smp_thermal_interrupt(void)
{
- ack_APIC_irq();
exit_idle();
irq_enter();
- intel_thermal_interrupt();
inc_irq_stat(irq_thermal_count);
+ intel_thermal_interrupt();
irq_exit();
+ ack_APIC_irq();
+}
+
+void intel_set_thermal_handler(void)
+{
+ vendor_thermal_interrupt = intel_thermal_interrupt;
}
/*
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c
index ddeed6e295a..75313f5b624 100644
--- a/arch/x86/kernel/cpu/mcheck/p4.c
+++ b/arch/x86/kernel/cpu/mcheck/p4.c
@@ -12,6 +12,7 @@
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/apic.h>
+#include <asm/idle.h>
#include <asm/mce.h>
#include <asm/msr.h>
@@ -47,10 +48,9 @@ static void intel_thermal_interrupt(void)
{
__u64 msr_val;
- ack_APIC_irq();
-
rdmsrl(MSR_IA32_THERM_STATUS, msr_val);
- therm_throt_process(msr_val & THERM_STATUS_PROCHOT);
+ if (therm_throt_process(msr_val & THERM_STATUS_PROCHOT))
+ mce_log_therm_throt_event(msr_val);
}
/* Thermal interrupt handler for this CPU setup: */
@@ -58,10 +58,12 @@ static void (*vendor_thermal_interrupt)(void) = unexpected_thermal_interrupt;
void smp_thermal_interrupt(struct pt_regs *regs)
{
+ exit_idle();
irq_enter();
- vendor_thermal_interrupt();
inc_irq_stat(irq_thermal_count);
+ vendor_thermal_interrupt();
irq_exit();
+ ack_APIC_irq();
}
void intel_set_thermal_handler(void)