aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r--arch/arm/kernel/time.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index d7d932c02866..d6bd435a6857 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -422,12 +422,14 @@ static int timer_dyn_tick_disable(void)
422void timer_dyn_reprogram(void) 422void timer_dyn_reprogram(void)
423{ 423{
424 struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; 424 struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
425 unsigned long next, seq;
425 426
426 if (dyn_tick) { 427 if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) {
427 write_seqlock(&xtime_lock); 428 next = next_timer_interrupt();
428 if (dyn_tick->state & DYN_TICK_ENABLED) 429 do {
430 seq = read_seqbegin(&xtime_lock);
429 dyn_tick->reprogram(next_timer_interrupt() - jiffies); 431 dyn_tick->reprogram(next_timer_interrupt() - jiffies);
430 write_sequnlock(&xtime_lock); 432 } while (read_seqretry(&xtime_lock, seq));
431 } 433 }
432} 434}
433 435