Skip to content

Commit

Permalink
MIPS: Fix syscall tracing interface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
larperaxis authored and ralfbaechle committed Mar 17, 2014
1 parent a8031d2 commit 86ca57b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,

#ifdef CONFIG_32BIT
case 4: case 5: case 6: case 7:
return get_user(*arg, (int *)usp + 4 * n);
return get_user(*arg, (int *)usp + n);
#endif

#ifdef CONFIG_64BIT
case 4: case 5: case 6: case 7:
#ifdef CONFIG_MIPS32_O32
if (test_thread_flag(TIF_32BIT_REGS))
return get_user(*arg, (int *)usp + 4 * n);
return get_user(*arg, (int *)usp + n);
else
#endif
*arg = regs->regs[4 + n];
Expand Down

0 comments on commit 86ca57b

Please sign in to comment.