@@ -1708,6 +1708,14 @@
hpet_mmap= [X86, HPET_MMAP] Allow userspace to mmap HPET
registers. Default set by CONFIG_HPET_MMAP_DEFAULT.
+ hpet_nmi_watchdog [X86, KNL]
+ Drive the NMI watchdog with an HPET channel. This option
+ has no effect if the NMI watchdog is not enabled.
+ The HPET NMI watchdog conflicts with the parameters
+ nohz_full, no_ipi_broadcast, and hpet=disable. If any
+ of these parameters is present the NMI watchdog will
+ fall back to the perf-driven implementation.
+
hugepages= [HW] Number of HugeTLB pages to allocate at boot.
If this follows hugepagesz (below), it specifies
the number of pages of hugepagesz to be allocated.
@@ -39,6 +39,7 @@
#include "apic/local.h"
static struct hpet_hld_data *hld_data;
+static bool hardlockup_use_hpet;
static u64 tsc_next_error;
static void __init setup_hpet_channel(struct hpet_hld_data *hdata)
@@ -366,6 +367,19 @@ void hardlockup_detector_hpet_start(void)
enable_timer(hld_data);
}
+/**
+ * hardlockup_detector_hpet_setup() - Parse command-line parameters
+ * @str: A string containing the kernel command line
+ *
+ * If selected by the user, enable this hardlockup detector.
+ */
+static int __init hardlockup_detector_hpet_setup(char *str)
+{
+ hardlockup_use_hpet = true;
+ return 1;
+}
+__setup("hpet_nmi_watchdog", hardlockup_detector_hpet_setup);
+
static const char hpet_hld_init_failed[] = "Initialization failed:";
/**
@@ -382,6 +396,9 @@ int __init hardlockup_detector_hpet_init(void)
{
int ret;
+ if (!hardlockup_use_hpet)
+ return -ENODEV;
+
if (!is_hpet_enabled()) {
pr_info("%s HPET unavailable\n", hpet_hld_init_failed);
return -ENODEV;