mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
The powerpc architecture was the only one that defined arch_trigger_cpumask_backtrace() in asm/nmi.h instead of asm/irq.h. Move it to be consistent. This fixes compile time errors introduced by commit7ca8fe94aa("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH"). That commit caused <asm/nmi.h> to stop being included if the hardlockup detector wasn't enabled. The specific errors were: error: implicit declaration of function `nmi_cpu_backtrace' error: implicit declaration of function `nmi_trigger_cpumask_backtrace' NOTE: when moving this into irq.h, we also change the guards from just checking if "CONFIG_NMI_IPI" is defined to also checking if "CONFIG_PPC_BOOK3S_64" is defined. This matches the code in arch/powerpc/kernel/stacktrace.c. Previously this worked because <asm.nmi.h> was included if "CONFIG_HAVE_HARDLOCKUP_DETECTOR_ARCH" was defined. For powerpc that's only selected if "CONFIG_PPC_BOOK3S_64" is defined. [[email protected]: change the guards to include CONFIG_PPC_BOOK3S_64] Link: https://lkml.kernel.org/r/20230622202816.v2.1.Ice67126857506712559078e7de26d32d26e64631@changeid Link: https://lkml.kernel.org/r/20230621164809.1.Ice67126857506712559078e7de26d32d26e64631@changeid Fixes:7ca8fe94aa("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH") Signed-off-by: Douglas Anderson <[email protected]> Reported-by: Michael Ellerman <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Reviewed-by: Petr Mladek <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Laurent Dufour <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Tom Rix <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
15 lines
372 B
C
15 lines
372 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_NMI_H
|
|
#define _ASM_NMI_H
|
|
|
|
#ifdef CONFIG_PPC_WATCHDOG
|
|
long soft_nmi_interrupt(struct pt_regs *regs);
|
|
void watchdog_hardlockup_set_timeout_pct(u64 pct);
|
|
#else
|
|
static inline void watchdog_hardlockup_set_timeout_pct(u64 pct) {}
|
|
#endif
|
|
|
|
extern void hv_nmi_check_nonrecoverable(struct pt_regs *regs);
|
|
|
|
#endif /* _ASM_NMI_H */
|