Re: Linux 5.17-rc3

From: Linus Torvalds
Date: Mon Feb 07 2022 - 12:57:00 EST


On Sun, Feb 6, 2022 at 4:11 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
> arch/powerpc/kernel/stacktrace.c: In function 'handle_backtrace_ipi':
> arch/powerpc/kernel/stacktrace.c:171:9: error: implicit declaration of function 'nmi_cpu_backtrace'
>
> Introduced with commit 1614b2b11fab29 ("arch: Make ARCH_STACKWALK
> independent of STACKTRACE"). Discussed at
> https://lore.kernel.org/lkml/YeE2VWwHO50gFw9M@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/
> No fix posted as far as I know, and no recent progress.

Well, there's actually a suggested fix in that thread (PeterZ's "I
suppose this ought to cure things...").

But I'll leave it to the powerpc people to decide how they want to
sort out that #ifdef confusion.

There's some *generic* #ifdef confusion in this area too, with
<linux/nmi.h> having

#if defined(CONFIG_HAVE_NMI_WATCHDOG)
#include <asm/nmi.h>
#endif

at the top - which is where you want it for those #ifdef
arch_trigger_cpumask_backtrace games later in that file, and then

#ifdef CONFIG_HAVE_ACPI_APEI_NMI
#include <asm/nmi.h>
#endif

at the bottom of the file - by which time it is too late for the
arch_trigger_cpumask_backtrace games.

The exact Kconfig rules are a bit obscure too, with
HAVE_HARDLOCKUP_DETECTOR_ARCH and HAVE_NMI_WATCHDOG being all mixed
up.

What a mess.

Linus