watchdog: export lockup_detector_reconfigure
[sfrench/cifs-2.6.git] / kernel / watchdog.c
index 20a7a55e62b6143b9cb9e5d1182ac108c5c2860d..41596c415111b62ebde1aa0e7f7144cd7fcb8ff5 100644 (file)
@@ -541,7 +541,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();
@@ -561,6 +561,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).
  */
@@ -577,13 +584,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();
@@ -591,9 +598,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 */
 
@@ -633,7 +644,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();
 }
 
 /*