summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/syscall.h
diff options
context:
space:
mode:
authorLars Persson <lars.persson@axis.com>2015-02-03 19:08:17 +0300
committerRalf Baechle <ralf@linux-mips.org>2015-02-04 18:40:09 +0300
commitc2d9f17757310484ab4fd65954f5f9850f6a1349 (patch)
tree93df833f0fdbddb083326d14eff6585d086e3186 /arch/mips/include/asm/syscall.h
parent26f7c4bd05cf34e63a4a794150ab66a40a5a84a9 (diff)
downloadlinux-c2d9f17757310484ab4fd65954f5f9850f6a1349.tar.xz
MIPS: Fix syscall_get_nr for the syscall exit tracing.
Register 2 is alredy overwritten by the return value when syscall_trace_leave() is called. Signed-off-by: Lars Persson <larper@axis.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9187/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/syscall.h')
-rw-r--r--arch/mips/include/asm/syscall.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index bb7963753730..6499d93ae68d 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -29,13 +29,7 @@
static inline long syscall_get_nr(struct task_struct *task,
struct pt_regs *regs)
{
- /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */
- if ((config_enabled(CONFIG_32BIT) ||
- test_tsk_thread_flag(task, TIF_32BIT_REGS)) &&
- (regs->regs[2] == __NR_syscall))
- return regs->regs[4];
- else
- return regs->regs[2];
+ return current_thread_info()->syscall;
}
static inline unsigned long mips_get_syscall_arg(unsigned long *arg,