diff options
| author | Yang Li <yang.li85200@gmail.com> | 2024-10-16 17:56:26 +0800 |
|---|---|---|
| committer | Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org> | 2025-10-19 02:42:40 -0400 |
| commit | 809ef03d6d21d5fea016bbf6babeec462e37e68c (patch) | |
| tree | f63097046fca70480213e90e55a826dfbac73b63 | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
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>
| -rw-r--r-- | arch/csky/mm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c index a6ca7dff4215..7ff401108985 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) == (unsigned long)&csky_cmpxchg_stw) + instruction_pointer_set(regs, (unsigned long)&csky_cmpxchg_ldw); return; } #endif |
