@@ -400,18 +400,6 @@ config HAVE_HARDLOCKUP_DETECTOR_PERF
The arch chooses to use the generic perf-NMI-based hardlockup
detector. Must define HAVE_PERF_EVENTS_NMI.
-config HAVE_NMI_WATCHDOG
- depends on HAVE_NMI
- bool
- help
- Sparc64 provides its own hardlockup detector implementation instead
- of the generic perf one.
-
- It does _not_ use the command line parameters and sysctl interface
- used by generic hardlockup detectors. Instead it is enabled/disabled
- by the top-level watchdog interface that is common for both softlockup
- and hardlockup detectors.
-
config HAVE_HARDLOCKUP_DETECTOR_ARCH
bool
help
@@ -33,7 +33,7 @@ config SPARC
select ARCH_WANT_IPC_PARSE_VERSION
select GENERIC_PCI_IOMAP
select HAS_IOPORT
- select HAVE_NMI_WATCHDOG if SPARC64
+ select HAVE_HARDLOCKUP_DETECTOR_SPARC64 if SPARC64
select HAVE_CBPF_JIT if SPARC32
select HAVE_EBPF_JIT if SPARC64
select HAVE_DEBUG_BUGVERBOSE
@@ -14,3 +14,15 @@ config FRAME_POINTER
bool
depends on MCOUNT
default y
+
+config HAVE_HARDLOCKUP_DETECTOR_SPARC64
+ depends on HAVE_NMI
+ bool
+ help
+ Sparc64 provides its own hardlockup detector implementation instead
+ of the generic perf one.
+
+ It does _not_ use the command line parameters and sysctl interface
+ used by generic hardlockup detectors. Instead it is enabled/disabled
+ by the top-level watchdog interface that is common for both softlockup
+ and hardlockup detectors.
@@ -9,7 +9,7 @@
#include <asm/irq.h>
/* Arch specific watchdogs might need to share extra watchdog-related APIs. */
-#if defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH) || defined(CONFIG_HAVE_NMI_WATCHDOG)
+#if defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
#include <asm/nmi.h>
#endif
@@ -92,7 +92,7 @@ static inline void hardlockup_detector_disable(void) {}
#endif
/* Sparc64 has special implemetantion that is always enabled. */
-#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG)
+#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
void arch_touch_nmi_watchdog(void);
#else
static inline void arch_touch_nmi_watchdog(void) { }
@@ -29,7 +29,7 @@
static DEFINE_MUTEX(watchdog_mutex);
-#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG)
+#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
# define WATCHDOG_HARDLOCKUP_DEFAULT 1
#else
# define WATCHDOG_HARDLOCKUP_DEFAULT 0
@@ -1050,12 +1050,9 @@ config HAVE_HARDLOCKUP_DETECTOR_BUDDY
# sparc64: has a custom implementation which is not using the common
# hardlockup command line options and sysctl interface.
#
-# Note that HAVE_NMI_WATCHDOG is set when the sparc64 specific implementation
-# is used.
-#
config HARDLOCKUP_DETECTOR
bool "Detect Hard Lockups"
- depends on DEBUG_KERNEL && !S390 && !HAVE_NMI_WATCHDOG
+ depends on DEBUG_KERNEL && !S390 && !HAVE_HARDLOCKUP_DETECTOR_SPARC64
depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH
imply HARDLOCKUP_DETECTOR_PERF
imply HARDLOCKUP_DETECTOR_BUDDY
The configuration variable HAVE_NMI_WATCHDOG has a generic name but it is selected only for SPARC64. It should _not_ be used in general because it is not integrated with the other hardlockup detectors. Namely, it does not support the hardlockup specific command line parameters and systcl interface. Instead, it is enabled/disabled together with the softlockup detector by the global "watchdog" sysctl. Rename it to HAVE_HARDLOCKUP_WATCHDOG_SPARC64 to make the special behavior more clear. Also the variable is set only on sparc64. Move the definition from arch/Kconfig to arch/sparc/Kconfig.debug. Signed-off-by: Petr Mladek <pmladek@suse.com> --- arch/Kconfig | 12 ------------ arch/sparc/Kconfig | 2 +- arch/sparc/Kconfig.debug | 12 ++++++++++++ include/linux/nmi.h | 4 ++-- kernel/watchdog.c | 2 +- lib/Kconfig.debug | 5 +---- 6 files changed, 17 insertions(+), 20 deletions(-)