Skip to contentSkip to conversation

riscv: Require FRAME_POINTER for some configurations

PATCH Applied Björn Töpel 4 participants 5 messages Aug 23, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Require FRAME_POINTER for some configurations

From: Björn Töpel <[email protected]>

Some V configurations implicitly turn on '-fno-omit-frame-pointer', but leaving FRAME_POINTER disabled. This makes it hard to reason about the FRAME_POINTER config, and also triggers build failures introduced in by the commit in the Fixes: tag.

Select FRAME_POINTER explicitly for these configurations.

Fixes ebc9cb03b21e ("riscv: stack: Fixup independent softirq stack for CONFIG_FRAME_POINTER=n")
---
 arch/riscv/Kconfig  | 1 +
 arch/riscv/Makefile | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/riscv/Kconfig +1 -0
index 10e7a7ad175a..cd8075c092c3 100644
@@ -62,6 +62,7 @@ config RISCV
 	select COMMON_CLK
 	select CPU_PM if CPU_IDLE || HIBERNATION
 	select EDAC_SUPPORT
+	select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
 	select GENERIC_ARCH_TOPOLOGY
 	select GENERIC_ATOMIC64 if !64BIT
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
arch/riscv/Makefile +0 -3
index 6ec6d52a4180..1329e060c548 100644
@@ -87,9 +87,6 @@ endif
 ifeq ($(CONFIG_CMODEL_MEDANY),y)
 	KBUILD_CFLAGS += -mcmodel=medany
 endif
-ifeq ($(CONFIG_PERF_EVENTS),y)
-        KBUILD_CFLAGS += -fno-omit-frame-pointer
-endif
 
 # Avoid generating .eh_frame sections.
 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables

base-commit: 89bf6209cad66214d3774dac86b6bbf2aec6a30d

Signature · 7 lines
2.39.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Tested-by Acked-by on v1 1/1
#2 lore raw
In reply to Björn Töpel

Hi,

Quoted 11 lines · Björn Töpel

From: Björn Töpel <[email protected]>

Some V configurations implicitly turn on '-fno-omit-frame-pointer', but leaving FRAME_POINTER disabled. This makes it hard to reason about the FRAME_POINTER config, and also triggers build failures introduced in by the commit in the Fixes: tag.

Select FRAME_POINTER explicitly for these configurations.

Fixes ebc9cb03b21e ("riscv: stack: Fixup independent softirq stack for CONFIG_FRAME_POINTER=n")

WorksForMe. Thanks.

Quoted 33 lines
---
 arch/riscv/Kconfig  | 1 +
 arch/riscv/Makefile | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/riscv/Kconfig +1 -0
index 10e7a7ad175a..cd8075c092c3 100644
@@ -62,6 +62,7 @@ config RISCV
 	select COMMON_CLK
 	select CPU_PM if CPU_IDLE || HIBERNATION
 	select EDAC_SUPPORT
+	select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
 	select GENERIC_ARCH_TOPOLOGY
 	select GENERIC_ATOMIC64 if !64BIT
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
arch/riscv/Makefile +0 -3
index 6ec6d52a4180..1329e060c548 100644
@@ -87,9 +87,6 @@ endif
 ifeq ($(CONFIG_CMODEL_MEDANY),y)
 	KBUILD_CFLAGS += -mcmodel=medany
 endif
-ifeq ($(CONFIG_PERF_EVENTS),y)
-        KBUILD_CFLAGS += -fno-omit-frame-pointer
-endif
 
 # Avoid generating .eh_frame sections.
 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables

base-commit: 89bf6209cad66214d3774dac86b6bbf2aec6a30d

Signature · 1 line
~Randy
Reviewed-by on v1 1/1
#3 lore raw
In reply to Björn Töpel
Quoted 11 lines · Björn Töpel

From: Björn Töpel <[email protected]>

Some V configurations implicitly turn on '-fno-omit-frame-pointer', but leaving FRAME_POINTER disabled. This makes it hard to reason about the FRAME_POINTER config, and also triggers build failures introduced in by the commit in the Fixes: tag.

Select FRAME_POINTER explicitly for these configurations.

Fixes ebc9cb03b21e ("riscv: stack: Fixup independent softirq stack for CONFIG_FRAME_POINTER=n")

I think this is reasonable, even if you pre-patch version of this seemed quite sceptical.

Thanks,
Conor.

Quoted 41 lines
---
 arch/riscv/Kconfig  | 1 +
 arch/riscv/Makefile | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/riscv/Kconfig +1 -0
index 10e7a7ad175a..cd8075c092c3 100644
@@ -62,6 +62,7 @@ config RISCV
 	select COMMON_CLK
 	select CPU_PM if CPU_IDLE || HIBERNATION
 	select EDAC_SUPPORT
+	select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
 	select GENERIC_ARCH_TOPOLOGY
 	select GENERIC_ATOMIC64 if !64BIT
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
arch/riscv/Makefile +0 -3
index 6ec6d52a4180..1329e060c548 100644
@@ -87,9 +87,6 @@ endif
 ifeq ($(CONFIG_CMODEL_MEDANY),y)
 	KBUILD_CFLAGS += -mcmodel=medany
 endif
-ifeq ($(CONFIG_PERF_EVENTS),y)
-        KBUILD_CFLAGS += -fno-omit-frame-pointer
-endif
 
 # Avoid generating .eh_frame sections.
 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables

base-commit: 89bf6209cad66214d3774dac86b6bbf2aec6a30d

Signature · 7 lines
2.39.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#4 lore raw
In reply to Björn Töpel
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Wed, 23 Aug 2023 10:28:45 +0200 you wrote:

From: Björn Töpel <[email protected]>

Some V configurations implicitly turn on '-fno-omit-frame-pointer', but leaving FRAME_POINTER disabled. This makes it hard to reason about the FRAME_POINTER config, and also triggers build failures introduced in by the commit in the Fixes: tag.

[...]

Here is the summary with links:
- riscv: Require FRAME_POINTER for some configurations

    https://git.kernel.org/riscv/c/9f944d2e0ab3

You are awesome, thank you!

Signature · 9 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv