diff options
| -rw-r--r-- | kernel/softlockup.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index a3a0b239b7f7..6b682d86bddf 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
| @@ -64,12 +64,17 @@ static unsigned long get_timestamp(int this_cpu) | |||
| 64 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ | 64 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void touch_softlockup_watchdog(void) | 67 | static void __touch_softlockup_watchdog(void) |
| 68 | { | 68 | { |
| 69 | int this_cpu = raw_smp_processor_id(); | 69 | int this_cpu = raw_smp_processor_id(); |
| 70 | 70 | ||
| 71 | __raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu); | 71 | __raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu); |
| 72 | } | 72 | } |
| 73 | |||
| 74 | void touch_softlockup_watchdog(void) | ||
| 75 | { | ||
| 76 | __raw_get_cpu_var(touch_timestamp) = 0; | ||
| 77 | } | ||
| 73 | EXPORT_SYMBOL(touch_softlockup_watchdog); | 78 | EXPORT_SYMBOL(touch_softlockup_watchdog); |
| 74 | 79 | ||
| 75 | void touch_all_softlockup_watchdogs(void) | 80 | void touch_all_softlockup_watchdogs(void) |
| @@ -103,7 +108,7 @@ void softlockup_tick(void) | |||
| 103 | } | 108 | } |
| 104 | 109 | ||
| 105 | if (touch_timestamp == 0) { | 110 | if (touch_timestamp == 0) { |
| 106 | touch_softlockup_watchdog(); | 111 | __touch_softlockup_watchdog(); |
| 107 | return; | 112 | return; |
| 108 | } | 113 | } |
| 109 | 114 | ||
| @@ -118,7 +123,7 @@ void softlockup_tick(void) | |||
| 118 | 123 | ||
| 119 | /* do not print during early bootup: */ | 124 | /* do not print during early bootup: */ |
| 120 | if (unlikely(system_state != SYSTEM_RUNNING)) { | 125 | if (unlikely(system_state != SYSTEM_RUNNING)) { |
| 121 | touch_softlockup_watchdog(); | 126 | __touch_softlockup_watchdog(); |
| 122 | return; | 127 | return; |
| 123 | } | 128 | } |
| 124 | 129 | ||
| @@ -243,7 +248,7 @@ static int watchdog(void *__bind_cpu) | |||
| 243 | sched_setscheduler(current, SCHED_FIFO, ¶m); | 248 | sched_setscheduler(current, SCHED_FIFO, ¶m); |
| 244 | 249 | ||
| 245 | /* initialize timestamp */ | 250 | /* initialize timestamp */ |
| 246 | touch_softlockup_watchdog(); | 251 | __touch_softlockup_watchdog(); |
| 247 | 252 | ||
| 248 | set_current_state(TASK_INTERRUPTIBLE); | 253 | set_current_state(TASK_INTERRUPTIBLE); |
| 249 | /* | 254 | /* |
| @@ -252,7 +257,7 @@ static int watchdog(void *__bind_cpu) | |||
| 252 | * debug-printout triggers in softlockup_tick(). | 257 | * debug-printout triggers in softlockup_tick(). |
| 253 | */ | 258 | */ |
| 254 | while (!kthread_should_stop()) { | 259 | while (!kthread_should_stop()) { |
| 255 | touch_softlockup_watchdog(); | 260 | __touch_softlockup_watchdog(); |
| 256 | schedule(); | 261 | schedule(); |
| 257 | 262 | ||
| 258 | if (kthread_should_stop()) | 263 | if (kthread_should_stop()) |
