Merge tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux-block.git] / kernel / watchdog.c
index ecb0e8346e6534901bb6c94bec71e7e92baa104c..8e61f21e7e33e246f3730f232f4211a1c18f7b6e 100644 (file)
@@ -537,7 +537,7 @@ int lockup_detector_offline_cpu(unsigned int cpu)
        return 0;
 }
 
-static void lockup_detector_reconfigure(void)
+static void __lockup_detector_reconfigure(void)
 {
        cpus_read_lock();
        watchdog_nmi_stop();
@@ -557,6 +557,13 @@ static void lockup_detector_reconfigure(void)
        __lockup_detector_cleanup();
 }
 
+void lockup_detector_reconfigure(void)
+{
+       mutex_lock(&watchdog_mutex);
+       __lockup_detector_reconfigure();
+       mutex_unlock(&watchdog_mutex);
+}
+
 /*
  * Create the watchdog infrastructure and configure the detector(s).
  */
@@ -573,13 +580,13 @@ static __init void lockup_detector_setup(void)
                return;
 
        mutex_lock(&watchdog_mutex);
-       lockup_detector_reconfigure();
+       __lockup_detector_reconfigure();
        softlockup_initialized = true;
        mutex_unlock(&watchdog_mutex);
 }
 
 #else /* CONFIG_SOFTLOCKUP_DETECTOR */
-static void lockup_detector_reconfigure(void)
+static void __lockup_detector_reconfigure(void)
 {
        cpus_read_lock();
        watchdog_nmi_stop();
@@ -587,9 +594,13 @@ static void lockup_detector_reconfigure(void)
        watchdog_nmi_start();
        cpus_read_unlock();
 }
+void lockup_detector_reconfigure(void)
+{
+       __lockup_detector_reconfigure();
+}
 static inline void lockup_detector_setup(void)
 {
-       lockup_detector_reconfigure();
+       __lockup_detector_reconfigure();
 }
 #endif /* !CONFIG_SOFTLOCKUP_DETECTOR */
 
@@ -629,7 +640,7 @@ static void proc_watchdog_update(void)
 {
        /* Remove impossible cpus to keep sysctl output clean. */
        cpumask_and(&watchdog_cpumask, &watchdog_cpumask, cpu_possible_mask);
-       lockup_detector_reconfigure();
+       __lockup_detector_reconfigure();
 }
 
 /*