diff options
author | Lars Persson <lars.persson@axis.com> | 2014-03-17 07:14:13 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-17 10:38:38 -0400 |
commit | 86ca57b5a5525dbf89fc2a3285781fae807276b0 (patch) | |
tree | 1bcaaa3fd4f61dc0ae3efde507ad5f8cd34ca2ba /arch | |
parent | a8031d2ce15bdb90baeae02d7a231ccece73da8b (diff) |
MIPS: Fix syscall tracing interface
Fix pointer computation for stack-based arguments.
Signed-off-by: Lars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6620/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/syscall.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index a7e8a532f144..f35b131977e6 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h | |||
@@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg, | |||
40 | 40 | ||
41 | #ifdef CONFIG_32BIT | 41 | #ifdef CONFIG_32BIT |
42 | case 4: case 5: case 6: case 7: | 42 | case 4: case 5: case 6: case 7: |
43 | return get_user(*arg, (int *)usp + 4 * n); | 43 | return get_user(*arg, (int *)usp + n); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_64BIT | 46 | #ifdef CONFIG_64BIT |
47 | case 4: case 5: case 6: case 7: | 47 | case 4: case 5: case 6: case 7: |
48 | #ifdef CONFIG_MIPS32_O32 | 48 | #ifdef CONFIG_MIPS32_O32 |
49 | if (test_thread_flag(TIF_32BIT_REGS)) | 49 | if (test_thread_flag(TIF_32BIT_REGS)) |
50 | return get_user(*arg, (int *)usp + 4 * n); | 50 | return get_user(*arg, (int *)usp + n); |
51 | else | 51 | else |
52 | #endif | 52 | #endif |
53 | *arg = regs->regs[4 + n]; | 53 | *arg = regs->regs[4 + n]; |