summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/smp.c
diff options
context:
space:
mode:
authorStephane Eranian <eranian@hpl.hp.com>2007-02-13 13:26:22 +0100
committerAndi Kleen <andi@basil.nowhere.org>2007-02-13 13:26:22 +0100
commit2ff2d3d74705d34ab71b21f54634fcf50d57bdd5 (patch)
treeb74849c0a55f3eb4458e7399c6d30a0f8b270d58 /arch/i386/kernel/smp.c
parent86a978837ca739842317c4cf433de36aeb85ea3b (diff)
downloadop-kernel-dev-2ff2d3d74705d34ab71b21f54634fcf50d57bdd5.zip
op-kernel-dev-2ff2d3d74705d34ab71b21f54634fcf50d57bdd5.tar.gz
[PATCH] i386: add idle notifier
Add a notifier mechanism to the low level idle loop. You can register a callback function which gets invoked on entry and exit from the low level idle loop. The low level idle loop is defined as the polling loop, low-power call, or the mwait instruction. Interrupts processed by the idle thread are not considered part of the low level loop. The notifier can be used to measure precisely how much is spent in useless execution (or low power mode). The perfmon subsystem uses it to turn on/off monitoring. Signed-off-by: stephane eranian <eranian@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/smp.c')
-rw-r--r--arch/i386/kernel/smp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 5285aff..ffc4f65 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -23,6 +23,7 @@
#include <asm/mtrr.h>
#include <asm/tlbflush.h>
+#include <asm/idle.h>
#include <mach_apic.h>
/*
@@ -624,6 +625,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
/*
* At this point the info structure may be out of scope unless wait==1
*/
+ exit_idle();
irq_enter();
(*func)(info);
irq_exit();
OpenPOWER on IntegriCloud