diff options
author | Al Viro | 2022-08-08 16:06:04 +0100 |
---|---|---|
committer | Dinh Nguyen | 2022-08-15 11:25:31 -0500 |
commit | 8535c239ac674f7ead0f2652932d35c52c4123b2 (patch) | |
tree | e833d93155256430b2abf1070ee7e455ce74746c /arch/nios2 | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) |
nios2: page fault et.al. are *not* restartable syscalls...
make sure that ->orig_r2 is negative for everything except
the syscalls.
Fixes: 82ed08dd1b0e ("nios2: Exception handling")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Diffstat (limited to 'arch/nios2')
-rw-r--r-- | arch/nios2/include/asm/entry.h | 3 | ||||
-rw-r--r-- | arch/nios2/kernel/entry.S | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/nios2/include/asm/entry.h b/arch/nios2/include/asm/entry.h index cf37f55efbc2..bafb7b2ca59f 100644 --- a/arch/nios2/include/asm/entry.h +++ b/arch/nios2/include/asm/entry.h @@ -50,7 +50,8 @@ stw r13, PT_R13(sp) stw r14, PT_R14(sp) stw r15, PT_R15(sp) - stw r2, PT_ORIG_R2(sp) + movi r24, -1 + stw r24, PT_ORIG_R2(sp) stw r7, PT_ORIG_R7(sp) stw ra, PT_RA(sp) diff --git a/arch/nios2/kernel/entry.S b/arch/nios2/kernel/entry.S index 0794cd7803df..fbd348bf103f 100644 --- a/arch/nios2/kernel/entry.S +++ b/arch/nios2/kernel/entry.S @@ -185,6 +185,7 @@ ENTRY(handle_system_call) ldw r5, PT_R5(sp) local_restart: + stw r2, PT_ORIG_R2(sp) /* Check that the requested system call is within limits */ movui r1, __NR_syscalls bgeu r2, r1, ret_invsyscall @@ -336,9 +337,6 @@ external_interrupt: /* skip if no interrupt is pending */ beq r12, r0, ret_from_interrupt - movi r24, -1 - stw r24, PT_ORIG_R2(sp) - /* * Process an external hardware interrupt. */ |