diff options
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 36491cd5b7d4..1d7bca7f4f52 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -321,7 +321,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) | |||
321 | */ | 321 | */ |
322 | static int watchdog(void *unused) | 322 | static int watchdog(void *unused) |
323 | { | 323 | { |
324 | static struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; | 324 | struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; |
325 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); | 325 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); |
326 | 326 | ||
327 | sched_setscheduler(current, SCHED_FIFO, ¶m); | 327 | sched_setscheduler(current, SCHED_FIFO, ¶m); |
@@ -350,7 +350,8 @@ static int watchdog(void *unused) | |||
350 | set_current_state(TASK_INTERRUPTIBLE); | 350 | set_current_state(TASK_INTERRUPTIBLE); |
351 | } | 351 | } |
352 | __set_current_state(TASK_RUNNING); | 352 | __set_current_state(TASK_RUNNING); |
353 | 353 | param.sched_priority = 0; | |
354 | sched_setscheduler(current, SCHED_NORMAL, ¶m); | ||
354 | return 0; | 355 | return 0; |
355 | } | 356 | } |
356 | 357 | ||
@@ -438,7 +439,7 @@ static int watchdog_enable(int cpu) | |||
438 | 439 | ||
439 | /* create the watchdog thread */ | 440 | /* create the watchdog thread */ |
440 | if (!p) { | 441 | if (!p) { |
441 | p = kthread_create(watchdog, (void *)(unsigned long)cpu, "watchdog/%d", cpu); | 442 | p = kthread_create_on_node(watchdog, NULL, cpu_to_node(cpu), "watchdog/%d", cpu); |
442 | if (IS_ERR(p)) { | 443 | if (IS_ERR(p)) { |
443 | printk(KERN_ERR "softlockup watchdog for %i failed\n", cpu); | 444 | printk(KERN_ERR "softlockup watchdog for %i failed\n", cpu); |
444 | if (!err) { | 445 | if (!err) { |
@@ -480,6 +481,8 @@ static void watchdog_disable(int cpu) | |||
480 | } | 481 | } |
481 | } | 482 | } |
482 | 483 | ||
484 | /* sysctl functions */ | ||
485 | #ifdef CONFIG_SYSCTL | ||
483 | static void watchdog_enable_all_cpus(void) | 486 | static void watchdog_enable_all_cpus(void) |
484 | { | 487 | { |
485 | int cpu; | 488 | int cpu; |
@@ -509,8 +512,6 @@ static void watchdog_disable_all_cpus(void) | |||
509 | } | 512 | } |
510 | 513 | ||
511 | 514 | ||
512 | /* sysctl functions */ | ||
513 | #ifdef CONFIG_SYSCTL | ||
514 | /* | 515 | /* |
515 | * proc handler for /proc/sys/kernel/nmi_watchdog,watchdog_thresh | 516 | * proc handler for /proc/sys/kernel/nmi_watchdog,watchdog_thresh |
516 | */ | 517 | */ |