Skip to content

Commit eb5d732

Browse files
committed
riscv: Fixup PTR_L for calling exception
Here, PTR_L should be used. The original code was correct, but it was incorrectly changed to REG_L by commit 1f6d509828d9. Although this did not affect the current kernel usage, it is a semantic error that prevents my rv64ilp32 kernel from booting. So, this patch provides the correction. The reason is improper use of semantics: this is a pointer load, not a register load. Fixes: 1f6d509828d9 ("riscv: Improve exception and system call latency") Signed-off-by: Guo Ren <[email protected]>
1 parent 973ac31 commit eb5d732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/entry.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ _save_context:
119119
add t0, t1, t0
120120
/* Check if exception code lies within bounds */
121121
bgeu t0, t2, 3f
122-
REG_L t1, 0(t0)
122+
PTR_L t1, 0(t0)
123123
2:
124124
jalr t1
125125
j ret_from_exception

0 commit comments

Comments
 (0)