Re: [PATCH] LoongArch: cleanup dead static ftrace files

From: Jinyang He

Date: Thu Dec 03 2026 - 22:03:17 EST


On 2026-12-04 03:33, Julian Braha wrote:
Linux v6.17 removed static ftrace for architectures that support dynamic
ftrace in commit 9b4d5d330fcd ("ftrace: Make DYNAMIC_FTRACE always enabled
for architectures that support it"). Now, the DYNAMIC_FTRACE config option
can not be disabled when FUNCTION_TRACER=y, which makes ftrace.c and
mcount.S dead code.

Let's remove these dead files, and their impossible Makefile branch.

Signed-off-by: Julian Braha <julianbraha@xxxxxxxxx>
---
arch/loongarch/kernel/Makefile | 9 +--
arch/loongarch/kernel/ftrace.c | 73 ------------------------
arch/loongarch/kernel/mcount.S | 101 ---------------------------------
3 files changed, 2 insertions(+), 181 deletions(-)
delete mode 100644 arch/loongarch/kernel/ftrace.c
delete mode 100644 arch/loongarch/kernel/mcount.S
Hi, Julian,

Thanks for the cleanup. The dead #ifndef CONFIG_DYNAMIC_FTRACE branch in
arch/loongarch/include/asm/ftrace.h is still there. Others look good to me.

Jinyang