Skip to content

Commit 47f4cb4

Browse files
pmladekakpm00
authored andcommitted
watchdog/sparc64: define HARDLOCKUP_DETECTOR_SPARC64
The HAVE_ prefix means that the code could be enabled. Add another variable for HAVE_HARDLOCKUP_DETECTOR_SPARC64 without this prefix. It will be set when it should be built. It will make it compatible with the other hardlockup detectors. Before, it is far from obvious that the SPARC64 variant is actually used: $> make ARCH=sparc64 defconfig $> grep HARDLOCKUP_DETECTOR .config CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64=y After, it is more clear: $> make ARCH=sparc64 defconfig $> grep HARDLOCKUP_DETECTOR .config CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64=y CONFIG_HARDLOCKUP_DETECTOR_SPARC64=y Link: https://lkml.kernel.org/r/20230616150618.6073-6-pmladek@suse.com Signed-off-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent a5fcc23 commit 47f4cb4

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

arch/sparc/Kconfig.debug

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ config FRAME_POINTER
1616
default y
1717

1818
config HAVE_HARDLOCKUP_DETECTOR_SPARC64
19-
depends on HAVE_NMI
2019
bool
20+
depends on HAVE_NMI
21+
select HARDLOCKUP_DETECTOR_SPARC64
2122
help
2223
Sparc64 hardlockup detector is the last one developed before adding
2324
the common infrastructure for handling hardlockup detectors. It is
2425
always built. It does _not_ use the common command line parameters
2526
and sysctl interface, except for /proc/sys/kernel/nmi_watchdog.
27+
28+
config HARDLOCKUP_DETECTOR_SPARC64
29+
bool
30+
depends on HAVE_HARDLOCKUP_DETECTOR_SPARC64

include/linux/nmi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <asm/irq.h>
1010

1111
/* Arch specific watchdogs might need to share extra watchdog-related APIs. */
12-
#if defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
12+
#if defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH) || defined(CONFIG_HARDLOCKUP_DETECTOR_SPARC64)
1313
#include <asm/nmi.h>
1414
#endif
1515

@@ -90,7 +90,7 @@ static inline void hardlockup_detector_disable(void) {}
9090
#endif
9191

9292
/* Sparc64 has special implemetantion that is always enabled. */
93-
#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
93+
#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HARDLOCKUP_DETECTOR_SPARC64)
9494
void arch_touch_nmi_watchdog(void);
9595
#else
9696
static inline void arch_touch_nmi_watchdog(void) { }

kernel/watchdog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
static DEFINE_MUTEX(watchdog_mutex);
3131

32-
#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_HARDLOCKUP_DETECTOR_SPARC64)
32+
#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HARDLOCKUP_DETECTOR_SPARC64)
3333
# define WATCHDOG_HARDLOCKUP_DEFAULT 1
3434
#else
3535
# define WATCHDOG_HARDLOCKUP_DEFAULT 0

lib/Kconfig.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ config HAVE_HARDLOCKUP_DETECTOR_BUDDY
10521052
#
10531053
config HARDLOCKUP_DETECTOR
10541054
bool "Detect Hard Lockups"
1055-
depends on DEBUG_KERNEL && !S390 && !HAVE_HARDLOCKUP_DETECTOR_SPARC64
1055+
depends on DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64
10561056
depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH
10571057
imply HARDLOCKUP_DETECTOR_PERF
10581058
imply HARDLOCKUP_DETECTOR_BUDDY

0 commit comments

Comments
 (0)