diff options
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/clocksource.c | 16 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 4 |
2 files changed, 9 insertions, 11 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 548c436a776b..7f60097d443a 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -141,13 +141,8 @@ static void clocksource_watchdog(unsigned long data) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | if (!list_empty(&watchdog_list)) { | 143 | if (!list_empty(&watchdog_list)) { |
144 | /* Cycle through CPUs to check if the CPUs stay synchronized to | 144 | __mod_timer(&watchdog_timer, |
145 | * each other. */ | 145 | watchdog_timer.expires + WATCHDOG_INTERVAL); |
146 | int next_cpu = next_cpu(raw_smp_processor_id(), cpu_online_map); | ||
147 | if (next_cpu >= NR_CPUS) | ||
148 | next_cpu = first_cpu(cpu_online_map); | ||
149 | watchdog_timer.expires += WATCHDOG_INTERVAL; | ||
150 | add_timer_on(&watchdog_timer, next_cpu); | ||
151 | } | 146 | } |
152 | spin_unlock(&watchdog_lock); | 147 | spin_unlock(&watchdog_lock); |
153 | } | 148 | } |
@@ -169,7 +164,7 @@ static void clocksource_check_watchdog(struct clocksource *cs) | |||
169 | if (!started && watchdog) { | 164 | if (!started && watchdog) { |
170 | watchdog_last = watchdog->read(); | 165 | watchdog_last = watchdog->read(); |
171 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; | 166 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; |
172 | add_timer_on(&watchdog_timer, first_cpu(cpu_online_map)); | 167 | add_timer(&watchdog_timer); |
173 | } | 168 | } |
174 | } else { | 169 | } else { |
175 | if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) | 170 | if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) |
@@ -179,7 +174,7 @@ static void clocksource_check_watchdog(struct clocksource *cs) | |||
179 | if (watchdog) | 174 | if (watchdog) |
180 | del_timer(&watchdog_timer); | 175 | del_timer(&watchdog_timer); |
181 | watchdog = cs; | 176 | watchdog = cs; |
182 | init_timer_deferrable(&watchdog_timer); | 177 | init_timer(&watchdog_timer); |
183 | watchdog_timer.function = clocksource_watchdog; | 178 | watchdog_timer.function = clocksource_watchdog; |
184 | 179 | ||
185 | /* Reset watchdog cycles */ | 180 | /* Reset watchdog cycles */ |
@@ -190,8 +185,7 @@ static void clocksource_check_watchdog(struct clocksource *cs) | |||
190 | watchdog_last = watchdog->read(); | 185 | watchdog_last = watchdog->read(); |
191 | watchdog_timer.expires = | 186 | watchdog_timer.expires = |
192 | jiffies + WATCHDOG_INTERVAL; | 187 | jiffies + WATCHDOG_INTERVAL; |
193 | add_timer_on(&watchdog_timer, | 188 | add_timer(&watchdog_timer); |
194 | first_cpu(cpu_online_map)); | ||
195 | } | 189 | } |
196 | } | 190 | } |
197 | } | 191 | } |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 671af612b768..a3fa587c350c 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -191,8 +191,12 @@ static void change_clocksource(void) | |||
191 | 191 | ||
192 | tick_clock_notify(); | 192 | tick_clock_notify(); |
193 | 193 | ||
194 | /* | ||
195 | * We're holding xtime lock and waking up klogd would deadlock | ||
196 | * us on enqueue. So no printing! | ||
194 | printk(KERN_INFO "Time: %s clocksource has been installed.\n", | 197 | printk(KERN_INFO "Time: %s clocksource has been installed.\n", |
195 | clock->name); | 198 | clock->name); |
199 | */ | ||
196 | } | 200 | } |
197 | #else | 201 | #else |
198 | static inline void change_clocksource(void) { } | 202 | static inline void change_clocksource(void) { } |