diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-27 14:04:05 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-27 14:04:05 +0100 |
commit | 2ea83398b75309d8fdc999c4bb252e72d7e4fd9d (patch) | |
tree | 56719404c3fd74bce0356559b5738ad798c857fd /arch/arm/kernel/time.c | |
parent | 99bcc0590806c4f7a4ecf1a11add335b56cde963 (diff) | |
download | kernel_samsung_smdk4412-2ea83398b75309d8fdc999c4bb252e72d7e4fd9d.zip kernel_samsung_smdk4412-2ea83398b75309d8fdc999c4bb252e72d7e4fd9d.tar.gz kernel_samsung_smdk4412-2ea83398b75309d8fdc999c4bb252e72d7e4fd9d.tar.bz2 |
[PATCH] ARM: Add VST idle loop call
This call allows the dynamic tick support to reprogram the timer
immediately before the CPU idles.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r-- | arch/arm/kernel/time.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 06054c9..1b7fcd5 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -424,15 +424,19 @@ static int timer_dyn_tick_disable(void) return ret; } +/* + * Reprogram the system timer for at least the calculated time interval. + * This function should be called from the idle thread with IRQs disabled, + * immediately before sleeping. + */ void timer_dyn_reprogram(void) { struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; - unsigned long flags; - write_seqlock_irqsave(&xtime_lock, flags); + write_seqlock(&xtime_lock); if (dyn_tick->state & DYN_TICK_ENABLED) dyn_tick->reprogram(next_timer_interrupt() - jiffies); - write_sequnlock_irqrestore(&xtime_lock, flags); + write_sequnlock(&xtime_lock); } static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf) |