aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/mce_intel.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 22:44:36 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 19:04:55 -0800
commit95833c83f3b812c78e48db4eaa19f6c74958470b (patch)
tree8ad17da708141d66cf53c2113b4fe1710af929ec /arch/x86_64/kernel/mce_intel.c
parent[PATCH] x86_64: Clean up some printks in NUMA code (diff)
downloadlinux-dev-95833c83f3b812c78e48db4eaa19f6c74958470b.tar.xz
linux-dev-95833c83f3b812c78e48db4eaa19f6c74958470b.zip
[PATCH] x86_64: Add idle notifiers
This adds a new notifier chain that is called with IDLE_START when a CPU goes idle and IDLE_END when it goes out of idle. The context can be idle thread or interrupt context. Since we cannot rely on MONITOR/MWAIT existing the idle end check currently has to be done in all interrupt handlers. They were originally inspired by the similar s390 implementation. They have a variety of applications: - They will be needed for CONFIG_NO_IDLE_HZ - They can be used for oprofile to fix up the missing time in idle when performance counters don't tick. - They can be used for better C state management in ACPI - They could be used for microstate accounting. This is just infrastructure so far, no users. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/mce_intel.c')
-rw-r--r--arch/x86_64/kernel/mce_intel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/mce_intel.c b/arch/x86_64/kernel/mce_intel.c
index 0be0a7959814..3ef845e8d3b0 100644
--- a/arch/x86_64/kernel/mce_intel.c
+++ b/arch/x86_64/kernel/mce_intel.c
@@ -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;