Skip to contentSkip to conversation

lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS

PATCH Superseded Julian Braha 3 participants 4 messages Mar 28, 2021 – Mar 29, 2021 Library code

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS

When LATENCYTOP is enabled and ARCH_WANT_FRAME_POINTERS is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
Selected by [y]:
- LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86

Depending on ARCH_WANT_FRAME_POINTERS causes a recursive dependency error.
ARCH_WANT_FRAME_POINTERS is to be selected by the architecture, and is not supposed to be overridden by other config options.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +1 -1
index 2779c29d9981..8d53ed423899 100644
@@ -1665,7 +1665,7 @@ config LATENCYTOP
 	depends on DEBUG_KERNEL
 	depends on STACKTRACE_SUPPORT
 	depends on PROC_FS
-	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+	select FRAME_POINTER if MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
 	select KALLSYMS
 	select KALLSYMS_ALL
 	select STACKTRACE
Signature · 1 line
2.25.1
#1 lore raw

Hi Julian,

Quoted 8 lines · Julian Braha

When LATENCYTOP is enabled and ARCH_WANT_FRAME_POINTERS is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
Selected by [y]:
- LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86

Quoted 6 lines

Depending on ARCH_WANT_FRAME_POINTERS causes a recursive dependency error.
ARCH_WANT_FRAME_POINTERS is to be selected by the architecture, and is not supposed to be overridden by other config options.

Thanks for your patch!

lib/Kconfig.debug config LATENCYTOP · line 1668

Quoted 8 lines
lib/Kconfig.debug +1 -1
@@ -1665,7 +1665,7 @@ config LATENCYTOP
        depends on DEBUG_KERNEL
        depends on STACKTRACE_SUPPORT
        depends on PROC_FS
-       select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+       select FRAME_POINTER if MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86

s/select/depends on/?

lib/Kconfig.debug config LATENCYTOP · line 1671

Quoted 3 lines
lib/Kconfig.debug +0 -0
        select KALLSYMS
        select KALLSYMS_ALL
        select STACKTRACE

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw
In reply to Julian Braha

lib/Kconfig.debug config LATENCYTOP · line 1668

Quoted 10 lines · Julian Braha
lib/Kconfig.debug +1 -1
index 2779c29d9981..8d53ed423899 100644
@@ -1665,7 +1665,7 @@ config LATENCYTOP
 	depends on DEBUG_KERNEL
 	depends on STACKTRACE_SUPPORT
 	depends on PROC_FS
-	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+	select FRAME_POINTER if MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86

That doesn't look correct. It reverses the condition without reversing the result, which means the result is probably the opposite than intended.

The same expression occurs two more times in this file. Do those need to be changed as well?

Andreas.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
#3 lore raw
Quoted 16 lines · EDT you

lib/Kconfig.debug config LATENCYTOP · line 1668

Quoted 10 lines · Julian Braha
lib/Kconfig.debug +1 -1
index 2779c29d9981..8d53ed423899 100644
@@ -1665,7 +1665,7 @@ config LATENCYTOP
 	depends on DEBUG_KERNEL
 	depends on STACKTRACE_SUPPORT
 	depends on PROC_FS
-	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+	select FRAME_POINTER if MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86

That doesn't look correct. It reverses the condition without reversing the result, which means the result is probably the opposite than intended.

Quoted 6 lines

The same expression occurs two more times in this file. Do those need to be changed as well?

Andreas.

Hi all,

This was a mistake - I'll resubmit the proper patch.
Also: yes, the other usages of this select expression in this file will cause more unmet dependency bugs.
I'll include those in the resubmission as well.

- Julian Braha