diff options
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 7a6448340f90..59a28b1752f8 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -92,24 +92,24 @@ static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases; | |||
92 | /* Functions below help us manage 'deferrable' flag */ | 92 | /* Functions below help us manage 'deferrable' flag */ |
93 | static inline unsigned int tbase_get_deferrable(tvec_base_t *base) | 93 | static inline unsigned int tbase_get_deferrable(tvec_base_t *base) |
94 | { | 94 | { |
95 | return ((unsigned int)(unsigned long)base & TBASE_DEFERRABLE_FLAG); | 95 | return (unsigned int)((unsigned long)base & TBASE_DEFERRABLE_FLAG); |
96 | } | 96 | } |
97 | 97 | ||
98 | static inline tvec_base_t *tbase_get_base(tvec_base_t *base) | 98 | static inline tvec_base_t *tbase_get_base(tvec_base_t *base) |
99 | { | 99 | { |
100 | return ((tvec_base_t *)((unsigned long)base & ~TBASE_DEFERRABLE_FLAG)); | 100 | return (tvec_base_t *)((unsigned long)base & ~TBASE_DEFERRABLE_FLAG); |
101 | } | 101 | } |
102 | 102 | ||
103 | static inline void timer_set_deferrable(struct timer_list *timer) | 103 | static inline void timer_set_deferrable(struct timer_list *timer) |
104 | { | 104 | { |
105 | timer->base = ((tvec_base_t *)((unsigned long)(timer->base) | | 105 | timer->base = (tvec_base_t *)((unsigned long)timer->base | |
106 | TBASE_DEFERRABLE_FLAG)); | 106 | TBASE_DEFERRABLE_FLAG); |
107 | } | 107 | } |
108 | 108 | ||
109 | static inline void | 109 | static inline void |
110 | timer_set_base(struct timer_list *timer, tvec_base_t *new_base) | 110 | timer_set_base(struct timer_list *timer, tvec_base_t *new_base) |
111 | { | 111 | { |
112 | timer->base = (tvec_base_t *)((unsigned long)(new_base) | | 112 | timer->base = (tvec_base_t *)((unsigned long)new_base | |
113 | tbase_get_deferrable(timer->base)); | 113 | tbase_get_deferrable(timer->base)); |
114 | } | 114 | } |
115 | 115 | ||
@@ -1293,11 +1293,13 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self, | |||
1293 | long cpu = (long)hcpu; | 1293 | long cpu = (long)hcpu; |
1294 | switch(action) { | 1294 | switch(action) { |
1295 | case CPU_UP_PREPARE: | 1295 | case CPU_UP_PREPARE: |
1296 | case CPU_UP_PREPARE_FROZEN: | ||
1296 | if (init_timers_cpu(cpu) < 0) | 1297 | if (init_timers_cpu(cpu) < 0) |
1297 | return NOTIFY_BAD; | 1298 | return NOTIFY_BAD; |
1298 | break; | 1299 | break; |
1299 | #ifdef CONFIG_HOTPLUG_CPU | 1300 | #ifdef CONFIG_HOTPLUG_CPU |
1300 | case CPU_DEAD: | 1301 | case CPU_DEAD: |
1302 | case CPU_DEAD_FROZEN: | ||
1301 | migrate_timers(cpu); | 1303 | migrate_timers(cpu); |
1302 | break; | 1304 | break; |
1303 | #endif | 1305 | #endif |
@@ -1497,6 +1499,8 @@ unregister_time_interpolator(struct time_interpolator *ti) | |||
1497 | prev = &curr->next; | 1499 | prev = &curr->next; |
1498 | } | 1500 | } |
1499 | 1501 | ||
1502 | clocksource_resume(); | ||
1503 | |||
1500 | write_seqlock_irqsave(&xtime_lock, flags); | 1504 | write_seqlock_irqsave(&xtime_lock, flags); |
1501 | if (ti == time_interpolator) { | 1505 | if (ti == time_interpolator) { |
1502 | /* we lost the best time-interpolator: */ | 1506 | /* we lost the best time-interpolator: */ |