summaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-01-05 11:28:19 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-05 13:14:32 +0100
commit8bdec955b0da2ffbd10eb9b200651dd1f9e366f2 (patch)
tree8f44e541adf7e6110f064ed70e9f0751be98be95 /kernel/hrtimer.c
parentfe0bdec68b77020281dc814805edfe594ae89e0f (diff)
downloadop-kernel-dev-8bdec955b0da2ffbd10eb9b200651dd1f9e366f2.zip
op-kernel-dev-8bdec955b0da2ffbd10eb9b200651dd1f9e366f2.tar.gz
hrtimer: splitout peek ahead functionality
Impact: cleanup Provide a peek ahead function that assumes irqs disabled, allows for micro optimizations. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index eb2bfef..8f7001c 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1243,6 +1243,22 @@ void hrtimer_interrupt(struct clock_event_device *dev)
}
}
+/*
+ * local version of hrtimer_peek_ahead_timers() called with interrupts
+ * disabled.
+ */
+static void __hrtimer_peek_ahead_timers(void)
+{
+ struct tick_device *td;
+
+ if (!hrtimer_hres_active())
+ return;
+
+ td = &__get_cpu_var(tick_cpu_device);
+ if (td && td->evtdev)
+ hrtimer_interrupt(td->evtdev);
+}
+
/**
* hrtimer_peek_ahead_timers -- run soft-expired timers now
*
@@ -1254,16 +1270,10 @@ void hrtimer_interrupt(struct clock_event_device *dev)
*/
void hrtimer_peek_ahead_timers(void)
{
- struct tick_device *td;
unsigned long flags;
- if (!hrtimer_hres_active())
- return;
-
local_irq_save(flags);
- td = &__get_cpu_var(tick_cpu_device);
- if (td && td->evtdev)
- hrtimer_interrupt(td->evtdev);
+ __hrtimer_peek_ahead_timers();
local_irq_restore(flags);
}
OpenPOWER on IntegriCloud