diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-02-12 14:22:56 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-02-12 14:22:56 -0500 |
commit | 86c8ead593305915729a7b67f738832764fb4ba7 (patch) | |
tree | eb33b75076c2b50dc8ae8ec0e240de876d31cd45 /kernel/time | |
parent | b22affe0aef429d657bc6505aacb1c569340ddd2 (diff) | |
parent | 5d1d9a29bc0772abee765f09513779a2ef0ebbfd (diff) |
Merge branch 'timers/for-arm' into timers/core
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/tick-broadcast.c | 22 |
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) | |||
92 | pr_crit_once("Failed to broadcast timer tick. Some CPUs may be unresponsive.\n"); | 92 | pr_crit_once("Failed to broadcast timer tick. Some CPUs may be unresponsive.\n"); |
93 | } | 93 | } |
94 | 94 | ||
95 | static void tick_device_setup_broadcast_func(struct clock_event_device *dev) | ||
96 | { | ||
97 | if (!dev->broadcast) | ||
98 | dev->broadcast = tick_broadcast; | ||
99 | if (!dev->broadcast) { | ||
100 | pr_warn_once("%s depends on broadcast, but no broadcast function available\n", | ||
101 | dev->name); | ||
102 | dev->broadcast = err_broadcast; | ||
103 | } | ||
104 | } | ||
105 | |||
95 | /* | 106 | /* |
96 | * Check, if the device is disfunctional and a place holder, which | 107 | * Check, if the device is disfunctional and a place holder, which |
97 | * needs to be handled by the broadcast device. | 108 | * needs to be handled by the broadcast device. |
@@ -111,13 +122,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) | |||
111 | */ | 122 | */ |
112 | if (!tick_device_is_functional(dev)) { | 123 | if (!tick_device_is_functional(dev)) { |
113 | dev->event_handler = tick_handle_periodic; | 124 | dev->event_handler = tick_handle_periodic; |
114 | if (!dev->broadcast) | 125 | tick_device_setup_broadcast_func(dev); |
115 | dev->broadcast = tick_broadcast; | ||
116 | if (!dev->broadcast) { | ||
117 | pr_warn_once("%s depends on broadcast, but no broadcast function available\n", | ||
118 | dev->name); | ||
119 | dev->broadcast = err_broadcast; | ||
120 | } | ||
121 | cpumask_set_cpu(cpu, tick_get_broadcast_mask()); | 126 | cpumask_set_cpu(cpu, tick_get_broadcast_mask()); |
122 | tick_broadcast_start_periodic(tick_broadcast_device.evtdev); | 127 | tick_broadcast_start_periodic(tick_broadcast_device.evtdev); |
123 | ret = 1; | 128 | ret = 1; |
@@ -129,9 +134,10 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) | |||
129 | */ | 134 | */ |
130 | if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) { | 135 | if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) { |
131 | int cpu = smp_processor_id(); | 136 | int cpu = smp_processor_id(); |
132 | |||
133 | cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); | 137 | cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); |
134 | tick_broadcast_clear_oneshot(cpu); | 138 | tick_broadcast_clear_oneshot(cpu); |
139 | } else { | ||
140 | tick_device_setup_broadcast_func(dev); | ||
135 | } | 141 | } |
136 | } | 142 | } |
137 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 143 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |