aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/hrtimer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 3c24fb2c25c8..8f320af837b5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1263,11 +1263,10 @@ void hrtimer_interrupt(struct clock_event_device *dev)
1263 cpu_base->nr_events++; 1263 cpu_base->nr_events++;
1264 dev->next_event.tv64 = KTIME_MAX; 1264 dev->next_event.tv64 = KTIME_MAX;
1265 1265
1266 raw_spin_lock(&cpu_base->lock);
1266 entry_time = now = ktime_get(); 1267 entry_time = now = ktime_get();
1267retry: 1268retry:
1268 expires_next.tv64 = KTIME_MAX; 1269 expires_next.tv64 = KTIME_MAX;
1269
1270 raw_spin_lock(&cpu_base->lock);
1271 /* 1270 /*
1272 * We set expires_next to KTIME_MAX here with cpu_base->lock 1271 * We set expires_next to KTIME_MAX here with cpu_base->lock
1273 * held to prevent that a timer is enqueued in our queue via 1272 * held to prevent that a timer is enqueued in our queue via
@@ -1344,6 +1343,7 @@ retry:
1344 * interrupt routine. We give it 3 attempts to avoid 1343 * interrupt routine. We give it 3 attempts to avoid
1345 * overreacting on some spurious event. 1344 * overreacting on some spurious event.
1346 */ 1345 */
1346 raw_spin_lock(&cpu_base->lock);
1347 now = ktime_get(); 1347 now = ktime_get();
1348 cpu_base->nr_retries++; 1348 cpu_base->nr_retries++;
1349 if (++retries < 3) 1349 if (++retries < 3)
@@ -1356,6 +1356,7 @@ retry:
1356 */ 1356 */
1357 cpu_base->nr_hangs++; 1357 cpu_base->nr_hangs++;
1358 cpu_base->hang_detected = 1; 1358 cpu_base->hang_detected = 1;
1359 raw_spin_unlock(&cpu_base->lock);
1359 delta = ktime_sub(now, entry_time); 1360 delta = ktime_sub(now, entry_time);
1360 if (delta.tv64 > cpu_base->max_hang_time.tv64) 1361 if (delta.tv64 > cpu_base->max_hang_time.tv64)
1361 cpu_base->max_hang_time = delta; 1362 cpu_base->max_hang_time = delta;