diff options
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r-- | kernel/time/timer.c | 25 |
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 | ||
1807 | static void migrate_timers(int cpu) | 1807 | int 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 | ||
1836 | static 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 | |||
1851 | static inline void timer_register_cpu_notifier(void) | ||
1852 | { | ||
1853 | cpu_notifier(timer_cpu_notify, 0); | ||
1854 | } | ||
1855 | #else | ||
1856 | static inline void timer_register_cpu_notifier(void) { } | ||
1857 | #endif /* CONFIG_HOTPLUG_CPU */ | 1837 | #endif /* CONFIG_HOTPLUG_CPU */ |
1858 | 1838 | ||
1859 | static void __init init_timer_cpu(int cpu) | 1839 | static 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 | ||