]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "hrtimers: Move lock held region in hrtimer_interrupt()"
authorGuangyu Sun <guangyu.sun@oracle.com>
Thu, 4 Oct 2012 22:46:57 +0000 (15:46 -0700)
committerGuangyu Sun <guangyu.sun@oracle.com>
Thu, 4 Oct 2012 22:46:57 +0000 (15:46 -0700)
This reverts commit c096117ffd444fd289e1f4216fc50ff266a6e98c.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
kernel/hrtimer.c

index 8fc65334191e8ad1e237390f93b759b427cd5225..a256babbaf082a38da981d856b7b6c553cd0221a 100644 (file)
@@ -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;