* [PATCH] powerpc: Fix STACKTRACE=n build
@ 2022-02-12 11:13 Michael Ellerman
2022-02-16 13:08 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2022-02-12 11:13 UTC (permalink / raw)
To: linuxppc-dev
Our skiroot_defconfig doesn't enable FTRACE, and so doesn't get
STACKTRACE enabled either. That leads to a build failure since commit
1614b2b11fab ("arch: Make ARCH_STACKWALK independent of STACKTRACE")
made stacktrace.c build even when STACKTRACE=n.
arch/powerpc/kernel/stacktrace.c: In function ‘handle_backtrace_ipi’:
arch/powerpc/kernel/stacktrace.c:171:2: error: implicit declaration of function ‘nmi_cpu_backtrace’
171 | nmi_cpu_backtrace(regs);
| ^~~~~~~~~~~~~~~~~
arch/powerpc/kernel/stacktrace.c: In function ‘arch_trigger_cpumask_backtrace’:
arch/powerpc/kernel/stacktrace.c:226:2: error: implicit declaration of function ‘nmi_trigger_cpumask_backtrace’
226 | nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace_ipi);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This happens because our headers haven't defined
arch_trigger_cpumask_backtrace, which causes lib/nmi_backtrace.c not to
build nmi_cpu_backtrace().
The code in question doesn't actually depend on STACKTRACE=y, that was
just added because arch_trigger_cpumask_backtrace() lived in
stacktrace.c for convenience. So drop the dependency on
CONFIG_STACKTRACE, that causes lib/nmi_backtrace.c to build
nmi_cpu_backtrace() etc. and fixes the build.
Fixes: 1614b2b11fab ("arch: Make ARCH_STACKWALK independent of STACKTRACE")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/include/asm/nmi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/nmi.h b/arch/powerpc/include/asm/nmi.h
index 160abcb8e9fa..ea0e487f87b1 100644
--- a/arch/powerpc/include/asm/nmi.h
+++ b/arch/powerpc/include/asm/nmi.h
@@ -9,7 +9,7 @@ long soft_nmi_interrupt(struct pt_regs *regs);
static inline void arch_touch_nmi_watchdog(void) {}
#endif
-#if defined(CONFIG_NMI_IPI) && defined(CONFIG_STACKTRACE)
+#ifdef CONFIG_NMI_IPI
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
bool exclude_self);
#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] powerpc: Fix STACKTRACE=n build
2022-02-12 11:13 [PATCH] powerpc: Fix STACKTRACE=n build Michael Ellerman
@ 2022-02-16 13:08 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-02-16 13:08 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
On Sat, 12 Feb 2022 22:13:49 +1100, Michael Ellerman wrote:
> Our skiroot_defconfig doesn't enable FTRACE, and so doesn't get
> STACKTRACE enabled either. That leads to a build failure since commit
> 1614b2b11fab ("arch: Make ARCH_STACKWALK independent of STACKTRACE")
> made stacktrace.c build even when STACKTRACE=n.
>
> arch/powerpc/kernel/stacktrace.c: In function ‘handle_backtrace_ipi’:
> arch/powerpc/kernel/stacktrace.c:171:2: error: implicit declaration of function ‘nmi_cpu_backtrace’
> 171 | nmi_cpu_backtrace(regs);
> | ^~~~~~~~~~~~~~~~~
> arch/powerpc/kernel/stacktrace.c: In function ‘arch_trigger_cpumask_backtrace’:
> arch/powerpc/kernel/stacktrace.c:226:2: error: implicit declaration of function ‘nmi_trigger_cpumask_backtrace’
> 226 | nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace_ipi);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Applied to powerpc/next.
[1/1] powerpc: Fix STACKTRACE=n build
https://git.kernel.org/powerpc/c/5a72345e6a78120368fcc841b570331b6c5a50da
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-16 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-12 11:13 [PATCH] powerpc: Fix STACKTRACE=n build Michael Ellerman
2022-02-16 13:08 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox