diff options
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/clockevents.c | 13 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 1 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 2 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 6 |
4 files changed, 9 insertions, 13 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 3e59fce6dd43..3d1e3e1a1971 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -133,7 +133,7 @@ static void clockevents_do_notify(unsigned long reason, void *dev) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Called after a notify add to make devices availble which were | 136 | * Called after a notify add to make devices available which were |
137 | * released from the notifier call. | 137 | * released from the notifier call. |
138 | */ | 138 | */ |
139 | static void clockevents_notify_released(void) | 139 | static void clockevents_notify_released(void) |
@@ -218,6 +218,8 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
218 | */ | 218 | */ |
219 | void clockevents_notify(unsigned long reason, void *arg) | 219 | void clockevents_notify(unsigned long reason, void *arg) |
220 | { | 220 | { |
221 | struct list_head *node, *tmp; | ||
222 | |||
221 | spin_lock(&clockevents_lock); | 223 | spin_lock(&clockevents_lock); |
222 | clockevents_do_notify(reason, arg); | 224 | clockevents_do_notify(reason, arg); |
223 | 225 | ||
@@ -227,13 +229,8 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
227 | * Unregister the clock event devices which were | 229 | * Unregister the clock event devices which were |
228 | * released from the users in the notify chain. | 230 | * released from the users in the notify chain. |
229 | */ | 231 | */ |
230 | while (!list_empty(&clockevents_released)) { | 232 | list_for_each_safe(node, tmp, &clockevents_released) |
231 | struct clock_event_device *dev; | 233 | list_del(node); |
232 | |||
233 | dev = list_entry(clockevents_released.next, | ||
234 | struct clock_event_device, list); | ||
235 | list_del(&dev->list); | ||
236 | } | ||
237 | break; | 234 | break; |
238 | default: | 235 | default: |
239 | break; | 236 | break; |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 81afb3927ecc..548c436a776b 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -91,7 +91,6 @@ static void clocksource_ratewd(struct clocksource *cs, int64_t delta) | |||
91 | cs->name, delta); | 91 | cs->name, delta); |
92 | cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG); | 92 | cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG); |
93 | clocksource_change_rating(cs, 0); | 93 | clocksource_change_rating(cs, 0); |
94 | cs->flags &= ~CLOCK_SOURCE_WATCHDOG; | ||
95 | list_del(&cs->wd_list); | 94 | list_del(&cs->wd_list); |
96 | } | 95 | } |
97 | 96 | ||
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 88267f0a8471..fa9bb73dbdb4 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -681,7 +681,7 @@ int tick_check_oneshot_change(int allow_nohz) | |||
681 | if (ts->nohz_mode != NOHZ_MODE_INACTIVE) | 681 | if (ts->nohz_mode != NOHZ_MODE_INACTIVE) |
682 | return 0; | 682 | return 0; |
683 | 683 | ||
684 | if (!timekeeping_is_continuous() || !tick_is_oneshot_available()) | 684 | if (!timekeeping_valid_for_hres() || !tick_is_oneshot_available()) |
685 | return 0; | 685 | return 0; |
686 | 686 | ||
687 | if (!allow_nohz) | 687 | if (!allow_nohz) |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index cd5dbc4579c9..1af9fb050fe2 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -201,9 +201,9 @@ static inline s64 __get_nsec_offset(void) { return 0; } | |||
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * timekeeping_is_continuous - check to see if timekeeping is free running | 204 | * timekeeping_valid_for_hres - Check if timekeeping is suitable for hres |
205 | */ | 205 | */ |
206 | int timekeeping_is_continuous(void) | 206 | int timekeeping_valid_for_hres(void) |
207 | { | 207 | { |
208 | unsigned long seq; | 208 | unsigned long seq; |
209 | int ret; | 209 | int ret; |
@@ -364,7 +364,7 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, | |||
364 | * with losing too many ticks, otherwise we would overadjust and | 364 | * with losing too many ticks, otherwise we would overadjust and |
365 | * produce an even larger error. The smaller the adjustment the | 365 | * produce an even larger error. The smaller the adjustment the |
366 | * faster we try to adjust for it, as lost ticks can do less harm | 366 | * faster we try to adjust for it, as lost ticks can do less harm |
367 | * here. This is tuned so that an error of about 1 msec is adusted | 367 | * here. This is tuned so that an error of about 1 msec is adjusted |
368 | * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks). | 368 | * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks). |
369 | */ | 369 | */ |
370 | error2 = clock->error >> (TICK_LENGTH_SHIFT + 22 - 2 * SHIFT_HZ); | 370 | error2 = clock->error >> (TICK_LENGTH_SHIFT + 22 - 2 * SHIFT_HZ); |