aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r--kernel/time/tick-common.c50
1 files changed, 4 insertions, 46 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 170a4bdfa99e..84c7cfca4d7d 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -284,7 +284,7 @@ out_bc:
284 * 284 *
285 * Called with interrupts disabled. 285 * Called with interrupts disabled.
286 */ 286 */
287static void tick_handover_do_timer(int *cpup) 287void tick_handover_do_timer(int *cpup)
288{ 288{
289 if (*cpup == tick_do_timer_cpu) { 289 if (*cpup == tick_do_timer_cpu) {
290 int cpu = cpumask_first(cpu_online_mask); 290 int cpu = cpumask_first(cpu_online_mask);
@@ -301,7 +301,7 @@ static void tick_handover_do_timer(int *cpup)
301 * access the hardware device itself. 301 * access the hardware device itself.
302 * We just set the mode and remove it from the lists. 302 * We just set the mode and remove it from the lists.
303 */ 303 */
304static void tick_shutdown(unsigned int *cpup) 304void tick_shutdown(unsigned int *cpup)
305{ 305{
306 struct tick_device *td = &per_cpu(tick_cpu_device, *cpup); 306 struct tick_device *td = &per_cpu(tick_cpu_device, *cpup);
307 struct clock_event_device *dev = td->evtdev; 307 struct clock_event_device *dev = td->evtdev;
@@ -319,14 +319,14 @@ static void tick_shutdown(unsigned int *cpup)
319 } 319 }
320} 320}
321 321
322static void tick_suspend(void) 322void tick_suspend(void)
323{ 323{
324 struct tick_device *td = &__get_cpu_var(tick_cpu_device); 324 struct tick_device *td = &__get_cpu_var(tick_cpu_device);
325 325
326 clockevents_shutdown(td->evtdev); 326 clockevents_shutdown(td->evtdev);
327} 327}
328 328
329static void tick_resume(void) 329void tick_resume(void)
330{ 330{
331 struct tick_device *td = &__get_cpu_var(tick_cpu_device); 331 struct tick_device *td = &__get_cpu_var(tick_cpu_device);
332 int broadcast = tick_resume_broadcast(); 332 int broadcast = tick_resume_broadcast();
@@ -341,48 +341,6 @@ static void tick_resume(void)
341 } 341 }
342} 342}
343 343
344/*
345 * Called with clockevents_lock held and interrupts disabled
346 */
347void tick_notify(unsigned long reason, void *dev)
348{
349 switch (reason) {
350
351 case CLOCK_EVT_NOTIFY_BROADCAST_ON:
352 case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
353 case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
354 tick_broadcast_on_off(reason, dev);
355 break;
356
357 case CLOCK_EVT_NOTIFY_BROADCAST_ENTER:
358 case CLOCK_EVT_NOTIFY_BROADCAST_EXIT:
359 tick_broadcast_oneshot_control(reason);
360 break;
361
362 case CLOCK_EVT_NOTIFY_CPU_DYING:
363 tick_handover_do_timer(dev);
364 break;
365
366 case CLOCK_EVT_NOTIFY_CPU_DEAD:
367 tick_shutdown_broadcast_oneshot(dev);
368 tick_shutdown_broadcast(dev);
369 tick_shutdown(dev);
370 break;
371
372 case CLOCK_EVT_NOTIFY_SUSPEND:
373 tick_suspend();
374 tick_suspend_broadcast();
375 break;
376
377 case CLOCK_EVT_NOTIFY_RESUME:
378 tick_resume();
379 break;
380
381 default:
382 break;
383 }
384}
385
386/** 344/**
387 * tick_init - initialize the tick control 345 * tick_init - initialize the tick control
388 */ 346 */