Skip to contentSkip to conversation

xtensa: drop ARCH_WANT_FRAME_POINTERS

PATCH New Max Filippov 1 participant 1 message Jun 9, 2023

Subsystems (2)
lore
Share & tools
lore

Max Filippov

author maintainer
#0 lore raw

PATCH 1/1 xtensa: drop ARCH_WANT_FRAME_POINTERS

ARCH_WANT_FRAME_POINTERS was enabled in the xtensa Kconfig in the commit 8f371c752154 ("xtensa: enable lockdep support"), but neither windowed nor call0 xtensa ABI need frame pointers for stack tracing. Drop ARCH_WANT_FRAME_POINTERS from the xtensa Kconfig.
Drop ftrace_return_address0 definition as the generic implementation is correct.

---
 arch/xtensa/Kconfig              | 1 -
 arch/xtensa/include/asm/ftrace.h | 9 ---------
 arch/xtensa/kernel/stacktrace.c  | 4 ----
 3 files changed, 14 deletions(-)
arch/xtensa/Kconfig +0 -1
index 46051edc5ed3..45f72c8fa911 100644
@@ -16,7 +16,6 @@ config XTENSA
 	select ARCH_USE_MEMTEST
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_USE_QUEUED_SPINLOCKS
-	select ARCH_WANT_FRAME_POINTERS
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_TABLE_SORT
 	select CLONE_BACKWARDS
arch/xtensa/include/asm/ftrace.h +0 -9
index 6c6d9a9f185f..0ea4f84cd558 100644
@@ -13,17 +13,8 @@
 #include <asm/processor.h>
 
 #ifndef __ASSEMBLY__
-#define ftrace_return_address0 ({ unsigned long a0, a1; \
-		__asm__ __volatile__ ( \
-			"mov %0, a0\n" \
-			"mov %1, a1\n" \
-			: "=r"(a0), "=r"(a1)); \
-		MAKE_PC_FROM_RA(a0, a1); })
-
-#ifdef CONFIG_FRAME_POINTER
 extern unsigned long return_address(unsigned level);
 #define ftrace_return_address(n) return_address(n)
-#endif
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_FUNCTION_TRACER
arch/xtensa/kernel/stacktrace.c +0 -4
index 7f7755cd28f0..f643ea5e36da 100644
@@ -237,8 +237,6 @@ EXPORT_SYMBOL_GPL(save_stack_trace);
 
 #endif
 
-#ifdef CONFIG_FRAME_POINTER
-
 struct return_addr_data {
 	unsigned long addr;
 	unsigned skip;
@@ -271,5 +269,3 @@ unsigned long return_address(unsigned level)
 	return r.addr;
 }
 EXPORT_SYMBOL(return_address);
-
-#endif
Signature · 1 line
2.30.2