diff options
author | Ulrich Obergfell <uobergfe@redhat.com> | 2015-04-14 18:44:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:48:59 -0400 |
commit | b2f57c3a0df9d168220be8848a303a32ef4d2e7d (patch) | |
tree | 8651fefd3ffd0295ac4c6b8ef6f9532a107936e4 /kernel/watchdog.c | |
parent | 195daf665a6299de98a4da3843fed2dd9de19d3a (diff) |
watchdog: clean up some function names and arguments
Rename the update_timers*() functions to update_watchdog*().
Remove the boolean argument from watchdog_enable_all_cpus() because
update_watchdog_all_cpus() is now a generic function to change the run
state of the lockup detectors and to have the lockup detectors use a new
sample period.
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 63d702885686..49d02250aaac 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -653,7 +653,7 @@ static void restart_watchdog_hrtimer(void *info) | |||
653 | HRTIMER_MODE_REL_PINNED); | 653 | HRTIMER_MODE_REL_PINNED); |
654 | } | 654 | } |
655 | 655 | ||
656 | static void update_timers(int cpu) | 656 | static void update_watchdog(int cpu) |
657 | { | 657 | { |
658 | /* | 658 | /* |
659 | * Make sure that perf event counter will adopt to a new | 659 | * Make sure that perf event counter will adopt to a new |
@@ -668,17 +668,17 @@ static void update_timers(int cpu) | |||
668 | watchdog_nmi_enable(cpu); | 668 | watchdog_nmi_enable(cpu); |
669 | } | 669 | } |
670 | 670 | ||
671 | static void update_timers_all_cpus(void) | 671 | static void update_watchdog_all_cpus(void) |
672 | { | 672 | { |
673 | int cpu; | 673 | int cpu; |
674 | 674 | ||
675 | get_online_cpus(); | 675 | get_online_cpus(); |
676 | for_each_online_cpu(cpu) | 676 | for_each_online_cpu(cpu) |
677 | update_timers(cpu); | 677 | update_watchdog(cpu); |
678 | put_online_cpus(); | 678 | put_online_cpus(); |
679 | } | 679 | } |
680 | 680 | ||
681 | static int watchdog_enable_all_cpus(bool sample_period_changed) | 681 | static int watchdog_enable_all_cpus(void) |
682 | { | 682 | { |
683 | int err = 0; | 683 | int err = 0; |
684 | 684 | ||
@@ -688,8 +688,12 @@ static int watchdog_enable_all_cpus(bool sample_period_changed) | |||
688 | pr_err("Failed to create watchdog threads, disabled\n"); | 688 | pr_err("Failed to create watchdog threads, disabled\n"); |
689 | else | 689 | else |
690 | watchdog_running = 1; | 690 | watchdog_running = 1; |
691 | } else if (sample_period_changed) { | 691 | } else { |
692 | update_timers_all_cpus(); | 692 | /* |
693 | * Enable/disable the lockup detectors or | ||
694 | * change the sample period 'on the fly'. | ||
695 | */ | ||
696 | update_watchdog_all_cpus(); | ||
693 | } | 697 | } |
694 | 698 | ||
695 | return err; | 699 | return err; |
@@ -721,7 +725,7 @@ static int proc_watchdog_update(void) | |||
721 | * or disabled 'on the fly'. | 725 | * or disabled 'on the fly'. |
722 | */ | 726 | */ |
723 | if (watchdog_enabled && watchdog_thresh) | 727 | if (watchdog_enabled && watchdog_thresh) |
724 | err = watchdog_enable_all_cpus(true); | 728 | err = watchdog_enable_all_cpus(); |
725 | else | 729 | else |
726 | watchdog_disable_all_cpus(); | 730 | watchdog_disable_all_cpus(); |
727 | 731 | ||
@@ -861,5 +865,5 @@ void __init lockup_detector_init(void) | |||
861 | set_sample_period(); | 865 | set_sample_period(); |
862 | 866 | ||
863 | if (watchdog_enabled) | 867 | if (watchdog_enabled) |
864 | watchdog_enable_all_cpus(false); | 868 | watchdog_enable_all_cpus(); |
865 | } | 869 | } |