|
@@ -261,3 +261,44 @@ void watchdog_nmi_disable(unsigned int cpu)
|
|
|
firstcpu_err = 0;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * hardlockup_detector_perf_stop - Globally stop watchdog events
|
|
|
+ *
|
|
|
+ * Special interface for x86 to handle the perf HT bug.
|
|
|
+ */
|
|
|
+void __init hardlockup_detector_perf_stop(void)
|
|
|
+{
|
|
|
+ int cpu;
|
|
|
+
|
|
|
+ lockdep_assert_cpus_held();
|
|
|
+
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
+ struct perf_event *event = per_cpu(watchdog_ev, cpu);
|
|
|
+
|
|
|
+ if (event)
|
|
|
+ perf_event_disable(event);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * hardlockup_detector_perf_restart - Globally restart watchdog events
|
|
|
+ *
|
|
|
+ * Special interface for x86 to handle the perf HT bug.
|
|
|
+ */
|
|
|
+void __init hardlockup_detector_perf_restart(void)
|
|
|
+{
|
|
|
+ int cpu;
|
|
|
+
|
|
|
+ lockdep_assert_cpus_held();
|
|
|
+
|
|
|
+ if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
|
|
|
+ return;
|
|
|
+
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
+ struct perf_event *event = per_cpu(watchdog_ev, cpu);
|
|
|
+
|
|
|
+ if (event)
|
|
|
+ perf_event_enable(event);
|
|
|
+ }
|
|
|
+}
|