Skip to content

Commit 809ef03

Browse files
yangli85200guoren83
authored andcommitted
csky: fix csky_cmpxchg_fixup not working
In the csky_cmpxchg_fixup function, it is incorrect to use the global variable csky_cmpxchg_stw to determine the address where the exception occurred.The global variable csky_cmpxchg_stw stores the opcode at the time of the exception, while &csky_cmpxchg_stw shows the address where the exception occurred. Signed-off-by: Yang Li <yang.li85200@gmail.com> Signed-off-by: Guo Ren <guoren@kernel.org>
1 parent 3a86608 commit 809ef03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/csky/mm/fault.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static inline void csky_cmpxchg_fixup(struct pt_regs *regs)
4545
if (trap_no(regs) != VEC_TLBMODIFIED)
4646
return;
4747

48-
if (instruction_pointer(regs) == csky_cmpxchg_stw)
49-
instruction_pointer_set(regs, csky_cmpxchg_ldw);
48+
if (instruction_pointer(regs) == (unsigned long)&csky_cmpxchg_stw)
49+
instruction_pointer_set(regs, (unsigned long)&csky_cmpxchg_ldw);
5050
return;
5151
}
5252
#endif

0 commit comments

Comments
 (0)