From: Guangyu Sun Date: Thu, 4 Oct 2012 22:46:57 +0000 (-0700) Subject: Revert "hrtimers: Move lock held region in hrtimer_interrupt()" X-Git-Tag: v2.6.39-400.9.0~303^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b72e5f0597e84494aedab2abe7bc74240313ca7e;p=users%2Fjedix%2Flinux-maple.git Revert "hrtimers: Move lock held region in hrtimer_interrupt()" This reverts commit c096117ffd444fd289e1f4216fc50ff266a6e98c. Signed-off-by: Guangyu Sun --- diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 8fc65334191e..a256babbaf08 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1263,10 +1263,11 @@ void hrtimer_interrupt(struct clock_event_device *dev) cpu_base->nr_events++; dev->next_event.tv64 = KTIME_MAX; - raw_spin_lock(&cpu_base->lock); entry_time = now = ktime_get(); retry: expires_next.tv64 = KTIME_MAX; + + raw_spin_lock(&cpu_base->lock); /* * We set expires_next to KTIME_MAX here with cpu_base->lock * held to prevent that a timer is enqueued in our queue via @@ -1343,7 +1344,6 @@ retry: * interrupt routine. We give it 3 attempts to avoid * overreacting on some spurious event. */ - raw_spin_lock(&cpu_base->lock); now = ktime_get(); cpu_base->nr_retries++; if (++retries < 3) @@ -1356,7 +1356,6 @@ retry: */ cpu_base->nr_hangs++; cpu_base->hang_detected = 1; - raw_spin_unlock(&cpu_base->lock); delta = ktime_sub(now, entry_time); if (delta.tv64 > cpu_base->max_hang_time.tv64) cpu_base->max_hang_time = delta;