[PATCH 6.12 168/242] Revert "LoongArch: Handle percpu handler address for ORC unwinder"

Greg Kroah-Hartman
2026-04-08T18:46:34Z

This reverts commit 8eeb34ae9d4c743b1fd2cf58f9c51def37091cf5.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/loongarch/include/asm/setup.h | 3 ---
arch/loongarch/kernel/unwind_orc.c | 16 +---------------
2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/arch/loongarch/include/asm/setup.h b/arch/loongarch/include/asm/setup.h
index f81375e5e89c0..3c2fb16b11b64 100644
--- a/arch/loongarch/include/asm/setup.h
+++ b/arch/loongarch/include/asm/setup.h
@@ -7,7 +7,6 @@
#define _LOONGARCH_SETUP_H

#include <linux/types.h>
-#include <linux/threads.h>
#include <asm/sections.h>
#include <uapi/asm/setup.h>

@@ -15,8 +14,6 @@

extern unsigned long eentry;
extern unsigned long tlbrentry;
-extern unsigned long pcpu_handlers[NR_CPUS];
-extern long exception_handlers[VECSIZE * 128 / sizeof(long)];
extern char init_command_line[COMMAND_LINE_SIZE];
extern void tlb_init(int cpu);
extern void cpu_cache_init(void);
diff --git a/arch/loongarch/kernel/unwind_orc.c b/arch/loongarch/kernel/unwind_orc.c
index e8b95f1bc5786..4924d1ecc4579 100644
--- a/arch/loongarch/kernel/unwind_orc.c
+++ b/arch/loongarch/kernel/unwind_orc.c
@@ -357,21 +357,7 @@ static bool is_entry_func(unsigned long addr)

static inline unsigned long bt_address(unsigned long ra)
{
-#if defined(CONFIG_NUMA) && !defined(CONFIG_PREEMPT_RT)
- int cpu;
- int vec_sz = sizeof(exception_handlers);
-
- for_each_possible_cpu(cpu) {
- if (!pcpu_handlers[cpu])
- continue;
-
- if (ra >= pcpu_handlers[cpu] &&
- ra < pcpu_handlers[cpu] + vec_sz) {
- ra = ra + eentry - pcpu_handlers[cpu];
- break;
- }
- }
-#endif
+ extern unsigned long eentry;

if (ra >= eentry && ra < eentry + EXCCODE_INT_END * VECSIZE) {
unsigned long func;
--
2.53.0