public inbox for linux-csky@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] csky: fix csky_cmpxchg_fixup not working
@ 2024-10-08  5:46 Yang Li
  2024-10-16  2:10 ` kernel test robot
  2024-10-16  9:56 ` [PATCH v2] " Yang Li
  0 siblings, 2 replies; 7+ messages in thread
From: Yang Li @ 2024-10-08  5:46 UTC (permalink / raw)
  To: guoren; +Cc: linux-csky, linux-kernel, Yang Li

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@gmail.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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-28  2:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08  5:46 [PATCH] csky: fix csky_cmpxchg_fixup not working Yang Li
2024-10-16  2:10 ` kernel test robot
2024-10-16  9:56 ` [PATCH v2] " Yang Li
2024-10-17  6:04   ` Guo Ren
     [not found]     ` <CA+N+=zu0=scmv9w7iZE2ZebxBVpvVb1eeoJ-qi=vhac-JhLthg@mail.gmail.com>
2024-10-18  8:46       ` yang li
2024-10-21  7:51     ` yang li
2024-10-28  2:54       ` Guo Ren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox