diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-05-15 16:11:17 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-05-15 16:11:17 -0400 |
commit | 6684e323a236d40461f27d36b38c6b70aabc9e71 (patch) | |
tree | 7eb6e0a22b7083c5e08f4f2cf3f15be7d938a572 /kernel | |
parent | 7531d692d4174789d583eb50fcb83cefa121b790 (diff) | |
parent | 0560551dca0c02a4b23f95a9c339882ff291e1c7 (diff) |
Merge branch 'origin'
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/clocksource.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 3db5c3c460d..51b6a6a6158 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -74,7 +74,7 @@ static struct clocksource *watchdog; static struct timer_list watchdog_timer; static DEFINE_SPINLOCK(watchdog_lock); static cycle_t watchdog_last; -static int watchdog_resumed; +static unsigned long watchdog_resumed; /* * Interval: 0.5sec Threshold: 0.0625s @@ -104,9 +104,7 @@ static void clocksource_watchdog(unsigned long data) spin_lock(&watchdog_lock); - resumed = watchdog_resumed; - if (unlikely(resumed)) - watchdog_resumed = 0; + resumed = test_and_clear_bit(0, &watchdog_resumed); wdnow = watchdog->read(); wd_nsec = cyc2ns(watchdog, (wdnow - watchdog_last) & watchdog->mask); @@ -151,9 +149,7 @@ static void clocksource_watchdog(unsigned long data) } static void clocksource_resume_watchdog(void) { - spin_lock(&watchdog_lock); - watchdog_resumed = 1; - spin_unlock(&watchdog_lock); + set_bit(0, &watchdog_resumed); } static void clocksource_check_watchdog(struct clocksource *cs) |