aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 16:55:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 16:55:30 -0400
commita6408f6cb63ac0958fee7dbce7861ffb540d8a49 (patch)
treec94a835d343974171951e3b805e6bbbb02852ebc /kernel/time/timer.c
parent1a81a8f2a5918956e214bb718099a89e500e7ec5 (diff)
parent4fae16dffb812f0e0d98a0b2b0856ca48ca63e6c (diff)
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp hotplug updates from Thomas Gleixner: "This is the next part of the hotplug rework. - Convert all notifiers with a priority assigned - Convert all CPU_STARTING/DYING notifiers The final removal of the STARTING/DYING infrastructure will happen when the merge window closes. Another 700 hundred line of unpenetrable maze gone :)" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits) timers/core: Correct callback order during CPU hot plug leds/trigger/cpu: Move from CPU_STARTING to ONLINE level powerpc/numa: Convert to hotplug state machine arm/perf: Fix hotplug state machine conversion irqchip/armada: Avoid unused function warnings ARC/time: Convert to hotplug state machine clocksource/atlas7: Convert to hotplug state machine clocksource/armada-370-xp: Convert to hotplug state machine clocksource/exynos_mct: Convert to hotplug state machine clocksource/arm_global_timer: Convert to hotplug state machine rcu: Convert rcutree to hotplug state machine KVM/arm/arm64/vgic-new: Convert to hotplug state machine smp/cfd: Convert core to hotplug state machine x86/x2apic: Convert to CPU hotplug state machine profile: Convert to hotplug state machine timers/core: Convert to hotplug state machine hrtimer: Convert to hotplug state machine x86/tboot: Convert to hotplug state machine arm64/armv8 deprecated: Convert to hotplug state machine hwtracing/coresight-etm4x: Convert to hotplug state machine ...
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index cb9ab401e2d9..555670a5143c 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1804,7 +1804,7 @@ static void migrate_timer_list(struct timer_base *new_base, struct hlist_head *h
1804 } 1804 }
1805} 1805}
1806 1806
1807static void migrate_timers(int cpu) 1807int timers_dead_cpu(unsigned int cpu)
1808{ 1808{
1809 struct timer_base *old_base; 1809 struct timer_base *old_base;
1810 struct timer_base *new_base; 1810 struct timer_base *new_base;
@@ -1831,29 +1831,9 @@ static void migrate_timers(int cpu)
1831 spin_unlock_irq(&new_base->lock); 1831 spin_unlock_irq(&new_base->lock);
1832 put_cpu_ptr(&timer_bases); 1832 put_cpu_ptr(&timer_bases);
1833 } 1833 }
1834 return 0;
1834} 1835}
1835 1836
1836static int timer_cpu_notify(struct notifier_block *self,
1837 unsigned long action, void *hcpu)
1838{
1839 switch (action) {
1840 case CPU_DEAD:
1841 case CPU_DEAD_FROZEN:
1842 migrate_timers((long)hcpu);
1843 break;
1844 default:
1845 break;
1846 }
1847
1848 return NOTIFY_OK;
1849}
1850
1851static inline void timer_register_cpu_notifier(void)
1852{
1853 cpu_notifier(timer_cpu_notify, 0);
1854}
1855#else
1856static inline void timer_register_cpu_notifier(void) { }
1857#endif /* CONFIG_HOTPLUG_CPU */ 1837#endif /* CONFIG_HOTPLUG_CPU */
1858 1838
1859static void __init init_timer_cpu(int cpu) 1839static void __init init_timer_cpu(int cpu)
@@ -1881,7 +1861,6 @@ void __init init_timers(void)
1881{ 1861{
1882 init_timer_cpus(); 1862 init_timer_cpus();
1883 init_timer_stats(); 1863 init_timer_stats();
1884 timer_register_cpu_notifier();
1885 open_softirq(TIMER_SOFTIRQ, run_timer_softirq); 1864 open_softirq(TIMER_SOFTIRQ, run_timer_softirq);
1886} 1865}
1887 1866