summaryrefslogtreecommitdiffstats
path: root/arch/csky/include
diff options
context:
space:
mode:
authorGuo Ren2019-04-22 08:46:44 +0200
committerGuo Ren2019-04-22 09:55:28 +0200
commita691f3334d58b833e41d56de1b9820e687edcd78 (patch)
treea5da17a314196bf4a97eae43557754712f6d172f /arch/csky/include
parentcsky: Fixup compile warning (diff)
downloadkernel-qcow2-linux-a691f3334d58b833e41d56de1b9820e687edcd78.tar.gz
kernel-qcow2-linux-a691f3334d58b833e41d56de1b9820e687edcd78.tar.xz
kernel-qcow2-linux-a691f3334d58b833e41d56de1b9820e687edcd78.zip
csky/syscall_trace: Fixup return processing flow
The function tracehook_report_syscall_entry's return value is __must_check attribute. We should add return processing flow in ptrace.c and set the syscall number to -1 when failed just like riscv's. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/csky/include')
-rw-r--r--arch/csky/include/asm/syscall.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/csky/include/asm/syscall.h b/arch/csky/include/asm/syscall.h
index 850b694a463e..8278658e74f9 100644
--- a/arch/csky/include/asm/syscall.h
+++ b/arch/csky/include/asm/syscall.h
@@ -17,6 +17,13 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
}
static inline void
+syscall_set_nr(struct task_struct *task, struct pt_regs *regs,
+ int sysno)
+{
+ regs_syscallid(regs) = sysno;
+}
+
+static inline void
syscall_rollback(struct task_struct *task, struct pt_regs *regs)
{
regs->a0 = regs->orig_a0;