aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/clockevents.c4
-rw-r--r--kernel/time/hrtimer.c4
-rw-r--r--kernel/time/tick-common.c9
-rw-r--r--kernel/time/tick-internal.h1
4 files changed, 6 insertions, 12 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index be9abf32c0b9..88fb3b96c7cc 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -655,10 +655,6 @@ int clockevents_notify(unsigned long reason, void *arg)
655 raw_spin_lock_irqsave(&clockevents_lock, flags); 655 raw_spin_lock_irqsave(&clockevents_lock, flags);
656 656
657 switch (reason) { 657 switch (reason) {
658 case CLOCK_EVT_NOTIFY_CPU_DYING:
659 tick_handover_do_timer(arg);
660 break;
661
662 case CLOCK_EVT_NOTIFY_CPU_DEAD: 658 case CLOCK_EVT_NOTIFY_CPU_DEAD:
663 tick_shutdown_broadcast_oneshot(arg); 659 tick_shutdown_broadcast_oneshot(arg);
664 tick_shutdown_broadcast(arg); 660 tick_shutdown_broadcast(arg);
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 721d29b99d10..6a7a64ec7d1b 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1707,10 +1707,6 @@ static int hrtimer_cpu_notify(struct notifier_block *self,
1707 break; 1707 break;
1708 1708
1709#ifdef CONFIG_HOTPLUG_CPU 1709#ifdef CONFIG_HOTPLUG_CPU
1710 case CPU_DYING:
1711 case CPU_DYING_FROZEN:
1712 clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DYING, &scpu);
1713 break;
1714 case CPU_DEAD: 1710 case CPU_DEAD:
1715 case CPU_DEAD_FROZEN: 1711 case CPU_DEAD_FROZEN:
1716 { 1712 {
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index e28ba5c044c5..055c868f3ec9 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -332,20 +332,23 @@ out_bc:
332 tick_install_broadcast_device(newdev); 332 tick_install_broadcast_device(newdev);
333} 333}
334 334
335#ifdef CONFIG_HOTPLUG_CPU
335/* 336/*
336 * Transfer the do_timer job away from a dying cpu. 337 * Transfer the do_timer job away from a dying cpu.
337 * 338 *
338 * Called with interrupts disabled. 339 * Called with interrupts disabled. Not locking required. If
340 * tick_do_timer_cpu is owned by this cpu, nothing can change it.
339 */ 341 */
340void tick_handover_do_timer(int *cpup) 342void tick_handover_do_timer(void)
341{ 343{
342 if (*cpup == tick_do_timer_cpu) { 344 if (tick_do_timer_cpu == smp_processor_id()) {
343 int cpu = cpumask_first(cpu_online_mask); 345 int cpu = cpumask_first(cpu_online_mask);
344 346
345 tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : 347 tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu :
346 TICK_DO_TIMER_NONE; 348 TICK_DO_TIMER_NONE;
347 } 349 }
348} 350}
351#endif
349 352
350/* 353/*
351 * Shutdown an event device on a given cpu: 354 * Shutdown an event device on a given cpu:
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 0266f9dbd114..aabcb5d00cf2 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -20,7 +20,6 @@ extern int tick_do_timer_cpu __read_mostly;
20extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast); 20extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast);
21extern void tick_handle_periodic(struct clock_event_device *dev); 21extern void tick_handle_periodic(struct clock_event_device *dev);
22extern void tick_check_new_device(struct clock_event_device *dev); 22extern void tick_check_new_device(struct clock_event_device *dev);
23extern void tick_handover_do_timer(int *cpup);
24extern void tick_shutdown(unsigned int *cpup); 23extern void tick_shutdown(unsigned int *cpup);
25extern void tick_suspend(void); 24extern void tick_suspend(void);
26extern void tick_resume(void); 25extern void tick_resume(void);