summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-02-12 20:22:56 +0100
committerThomas Gleixner <tglx@linutronix.de>2013-02-12 20:22:56 +0100
commit86c8ead593305915729a7b67f738832764fb4ba7 (patch)
treeeb33b75076c2b50dc8ae8ec0e240de876d31cd45 /kernel/time
parentb22affe0aef429d657bc6505aacb1c569340ddd2 (diff)
parent5d1d9a29bc0772abee765f09513779a2ef0ebbfd (diff)
downloadlinux-86c8ead593305915729a7b67f738832764fb4ba7.tar.bz2
Merge branch 'timers/for-arm' into timers/core
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/tick-broadcast.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index f726537d24eb..2fb8cb88df8d 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -92,6 +92,17 @@ static void err_broadcast(const struct cpumask *mask)
pr_crit_once("Failed to broadcast timer tick. Some CPUs may be unresponsive.\n");
}
+static void tick_device_setup_broadcast_func(struct clock_event_device *dev)
+{
+ if (!dev->broadcast)
+ dev->broadcast = tick_broadcast;
+ if (!dev->broadcast) {
+ pr_warn_once("%s depends on broadcast, but no broadcast function available\n",
+ dev->name);
+ dev->broadcast = err_broadcast;
+ }
+}
+
/*
* Check, if the device is disfunctional and a place holder, which
* needs to be handled by the broadcast device.
@@ -111,13 +122,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
*/
if (!tick_device_is_functional(dev)) {
dev->event_handler = tick_handle_periodic;
- if (!dev->broadcast)
- dev->broadcast = tick_broadcast;
- if (!dev->broadcast) {
- pr_warn_once("%s depends on broadcast, but no broadcast function available\n",
- dev->name);
- dev->broadcast = err_broadcast;
- }
+ tick_device_setup_broadcast_func(dev);
cpumask_set_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_start_periodic(tick_broadcast_device.evtdev);
ret = 1;
@@ -129,9 +134,10 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
*/
if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) {
int cpu = smp_processor_id();
-
cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_clear_oneshot(cpu);
+ } else {
+ tick_device_setup_broadcast_func(dev);
}
}
raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);