Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98306
b: refs/heads/master
c: 9c106c1
h: refs/heads/master
v: v3
  • Loading branch information
Jason Wessel authored and Ingo Molnar committed Jun 19, 2008
1 parent 5419c56 commit 79e11ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afd38009cc3acd36d41f349a669ad5825d695b1f
refs/heads/master: 9c106c119ebedf624fbd682fd2a4d52e3c8c1a67
15 changes: 10 additions & 5 deletions trunk/kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ static unsigned long get_timestamp(int this_cpu)
return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */
}

void touch_softlockup_watchdog(void)
static void __touch_softlockup_watchdog(void)
{
int this_cpu = raw_smp_processor_id();

__raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
}

void touch_softlockup_watchdog(void)
{
__raw_get_cpu_var(touch_timestamp) = 0;
}
EXPORT_SYMBOL(touch_softlockup_watchdog);

void touch_all_softlockup_watchdogs(void)
Expand All @@ -80,7 +85,7 @@ void softlockup_tick(void)
unsigned long now;

if (touch_timestamp == 0) {
touch_softlockup_watchdog();
__touch_softlockup_watchdog();
return;
}

Expand All @@ -95,7 +100,7 @@ void softlockup_tick(void)

/* do not print during early bootup: */
if (unlikely(system_state != SYSTEM_RUNNING)) {
touch_softlockup_watchdog();
__touch_softlockup_watchdog();
return;
}

Expand Down Expand Up @@ -214,7 +219,7 @@ static int watchdog(void *__bind_cpu)
sched_setscheduler(current, SCHED_FIFO, &param);

/* initialize timestamp */
touch_softlockup_watchdog();
__touch_softlockup_watchdog();

set_current_state(TASK_INTERRUPTIBLE);
/*
Expand All @@ -223,7 +228,7 @@ static int watchdog(void *__bind_cpu)
* debug-printout triggers in softlockup_tick().
*/
while (!kthread_should_stop()) {
touch_softlockup_watchdog();
__touch_softlockup_watchdog();
schedule();

if (kthread_should_stop())
Expand Down

0 comments on commit 79e11ef

Please sign in to comment.