aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-03-02 05:10:10 -0500
committerThomas Gleixner <tglx@linutronix.de>2013-03-07 10:13:26 -0500
commitf9ae39d04ccdec8d8ecf532191b7056c279a22c0 (patch)
tree9adfa7e4a39013b4089c0fbed889920e6327ef26 /kernel
parentb352bc1cbc29134a356b5c16ee2281807a7b984e (diff)
tick: Pass broadcast device to tick_broadcast_set_event()
Pass the broadcast timer to tick_broadcast_set_event() instead of reevaluating tick_broadcast_device.evtdev. [ tglx: Massaged changelog ] Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: viresh.kumar@linaro.org Cc: jacob.jun.pan@linux.intel.com Cc: linux-arm-kernel@lists.infradead.org Cc: santosh.shilimkar@ti.com Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Cc: rickard.andersson@stericsson.com Cc: vincent.guittot@linaro.org Cc: linus.walleij@stericsson.com Cc: john.stultz@linaro.org Link: http://lkml.kernel.org/r/1362219013-18173-2-git-send-email-daniel.lezcano@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-broadcast.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 35b887517766..70dd98ce18d7 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -401,10 +401,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
401 return tick_broadcast_oneshot_mask; 401 return tick_broadcast_oneshot_mask;
402} 402}
403 403
404static int tick_broadcast_set_event(ktime_t expires, int force) 404static int tick_broadcast_set_event(struct clock_event_device *bc,
405 ktime_t expires, int force)
405{ 406{
406 struct clock_event_device *bc = tick_broadcast_device.evtdev;
407
408 if (bc->mode != CLOCK_EVT_MODE_ONESHOT) 407 if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
409 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); 408 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
410 409
@@ -474,7 +473,7 @@ again:
474 * Rearm the broadcast device. If event expired, 473 * Rearm the broadcast device. If event expired,
475 * repeat the above 474 * repeat the above
476 */ 475 */
477 if (tick_broadcast_set_event(next_event, 0)) 476 if (tick_broadcast_set_event(dev, next_event, 0))
478 goto again; 477 goto again;
479 } 478 }
480 raw_spin_unlock(&tick_broadcast_lock); 479 raw_spin_unlock(&tick_broadcast_lock);
@@ -516,7 +515,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
516 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) { 515 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {
517 clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN); 516 clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
518 if (dev->next_event.tv64 < bc->next_event.tv64) 517 if (dev->next_event.tv64 < bc->next_event.tv64)
519 tick_broadcast_set_event(dev->next_event, 1); 518 tick_broadcast_set_event(bc, dev->next_event, 1);
520 } 519 }
521 } else { 520 } else {
522 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) { 521 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {
@@ -582,7 +581,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
582 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); 581 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
583 tick_broadcast_init_next_event(tmpmask, 582 tick_broadcast_init_next_event(tmpmask,
584 tick_next_period); 583 tick_next_period);
585 tick_broadcast_set_event(tick_next_period, 1); 584 tick_broadcast_set_event(bc, tick_next_period, 1);
586 } else 585 } else
587 bc->next_event.tv64 = KTIME_MAX; 586 bc->next_event.tv64 = KTIME_MAX;
588 } else { 587 } else {