[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241008054615.43062-1-yang.li85200@gmail.com>
Date: Tue, 8 Oct 2024 13:46:15 +0800
From: Yang Li <yang.li85200@...il.com>
To: guoren@...nel.org
Cc: linux-csky@...r.kernel.org,
linux-kernel@...r.kernel.org,
Yang Li <yang.li85200@...il.com>
Subject: [PATCH] csky: fix csky_cmpxchg_fixup not working
In the csky_cmpxchg_fixup function, using the global variable
csky_cmpxchg_stw to determine the address where the exception
occurred is incorrect. The global variable csky_cmpxchg_stw
stores the opcode at the time of the exception, while
&csky_cmpxchg_stw is the address where the exception occurred.
Signed-off-by: Yang Li <yang.li85200@...il.com>
---
arch/csky/mm/fault.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c
index a885518ce1dd..87ff26212261 100644
--- a/arch/csky/mm/fault.c
+++ b/arch/csky/mm/fault.c
@@ -45,8 +45,8 @@ static inline void csky_cmpxchg_fixup(struct pt_regs *regs)
if (trap_no(regs) != VEC_TLBMODIFIED)
return;
- if (instruction_pointer(regs) == csky_cmpxchg_stw)
- instruction_pointer_set(regs, csky_cmpxchg_ldw);
+ if (instruction_pointer(regs) == &csky_cmpxchg_stw)
+ instruction_pointer_set(regs, &csky_cmpxchg_ldw);
return;
}
#endif
--
2.34.1
Powered by blists - more mailing lists