Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ulrich Obergfell and committed by
Linus Torvalds
b2f57c3a 195daf66

+12 -8
+12 -8
kernel/watchdog.c
··· 653 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 659 * Make sure that perf event counter will adopt to a new ··· 668 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 673 int cpu; 674 674 675 675 get_online_cpus(); 676 676 for_each_online_cpu(cpu) 677 - update_timers(cpu); 677 + update_watchdog(cpu); 678 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 683 int err = 0; 684 684 ··· 688 688 pr_err("Failed to create watchdog threads, disabled\n"); 689 689 else 690 690 watchdog_running = 1; 691 - } else if (sample_period_changed) { 692 - update_timers_all_cpus(); 691 + } else { 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 699 return err; ··· 725 721 * or disabled 'on the fly'. 726 722 */ 727 723 if (watchdog_enabled && watchdog_thresh) 728 - err = watchdog_enable_all_cpus(true); 724 + err = watchdog_enable_all_cpus(); 729 725 else 730 726 watchdog_disable_all_cpus(); 731 727 ··· 865 861 set_sample_period(); 866 862 867 863 if (watchdog_enabled) 868 - watchdog_enable_all_cpus(false); 864 + watchdog_enable_all_cpus(); 869 865 }