From: Max Filippov Date: Thu, 14 Nov 2019 23:05:40 +0000 (-0800) Subject: xtensa: fix syscall_set_return_value X-Git-Tag: v5.15~4978^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2d9aa3b6e56de56c7f1ed9026ca6ec7cfbeef19;p=platform%2Fkernel%2Flinux-starfive.git xtensa: fix syscall_set_return_value syscall return value is in the register a2, not a0. Cc: stable@vger.kernel.org # v5.0+ Fixes: 9f24f3c1067c ("xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK") Signed-off-by: Max Filippov --- diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index 359ab40..c90fb94 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h @@ -51,7 +51,7 @@ static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { - regs->areg[0] = (long) error ? error : val; + regs->areg[2] = (long) error ? error : val; } #define SYSCALL_MAX_ARGS 6