diff options
| author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-02-24 14:31:04 -0500 |
|---|---|---|
| committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-02-24 14:33:45 -0500 |
| commit | 109d28152b6e9d5de64cd23e3bc08885ccb3d1ef (patch) | |
| tree | b7b8863faa05254781acfb85cc41da3eef467c6b /kernel/time/clocksource.c | |
| parent | 168cf9af699e87d5a6f44b684583714ecabb8e71 (diff) | |
| parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) | |
Merge tag 'v2.6.33' for its firewire changes since last branch point
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'kernel/time/clocksource.c')
| -rw-r--r-- | kernel/time/clocksource.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index e85c23404d34..13700833c181 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
| @@ -343,7 +343,19 @@ static void clocksource_resume_watchdog(void) | |||
| 343 | { | 343 | { |
| 344 | unsigned long flags; | 344 | unsigned long flags; |
| 345 | 345 | ||
| 346 | spin_lock_irqsave(&watchdog_lock, flags); | 346 | /* |
| 347 | * We use trylock here to avoid a potential dead lock when | ||
| 348 | * kgdb calls this code after the kernel has been stopped with | ||
| 349 | * watchdog_lock held. When watchdog_lock is held we just | ||
| 350 | * return and accept, that the watchdog might trigger and mark | ||
| 351 | * the monitored clock source (usually TSC) unstable. | ||
| 352 | * | ||
| 353 | * This does not affect the other caller clocksource_resume() | ||
| 354 | * because at this point the kernel is UP, interrupts are | ||
| 355 | * disabled and nothing can hold watchdog_lock. | ||
| 356 | */ | ||
| 357 | if (!spin_trylock_irqsave(&watchdog_lock, flags)) | ||
| 358 | return; | ||
| 347 | clocksource_reset_watchdog(); | 359 | clocksource_reset_watchdog(); |
| 348 | spin_unlock_irqrestore(&watchdog_lock, flags); | 360 | spin_unlock_irqrestore(&watchdog_lock, flags); |
| 349 | } | 361 | } |
| @@ -458,8 +470,8 @@ void clocksource_resume(void) | |||
| 458 | * clocksource_touch_watchdog - Update watchdog | 470 | * clocksource_touch_watchdog - Update watchdog |
| 459 | * | 471 | * |
| 460 | * Update the watchdog after exception contexts such as kgdb so as not | 472 | * Update the watchdog after exception contexts such as kgdb so as not |
| 461 | * to incorrectly trip the watchdog. | 473 | * to incorrectly trip the watchdog. This might fail when the kernel |
| 462 | * | 474 | * was stopped in code which holds watchdog_lock. |
| 463 | */ | 475 | */ |
| 464 | void clocksource_touch_watchdog(void) | 476 | void clocksource_touch_watchdog(void) |
| 465 | { | 477 | { |
