diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2012-10-09 21:16:07 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-14 19:31:30 -0400 |
commit | baf9ff74eda9f0efcc8a68e8a9c9d183be13a810 (patch) | |
tree | 4edd32d85cae4ef850973214a922c376537991c3 /arch/mips/include/asm/ptrace.h | |
parent | 8f54bcacbc39f883bde2210cf2754e5d198f55a4 (diff) | |
download | linux-baf9ff74eda9f0efcc8a68e8a9c9d183be13a810.tar.bz2 |
MIPS: Switch over to generic sys_execve and kernel_execve.
This version contains a few updates by David Daney, in particular it's
now using __builtin_frame_address() instead of asm() which depending
on personal taste, is slightly more appealing.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/ptrace.h')
-rw-r--r-- | arch/mips/include/asm/ptrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 4f5da948a777..cec5e125f7e4 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h @@ -61,4 +61,10 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs) die(str, regs); } +#define current_pt_regs() \ +({ \ + unsigned long sp = (unsigned long)__builtin_frame_address(0); \ + (struct pt_regs *)((sp | (THREAD_SIZE - 1)) + 1 - 32) - 1; \ +}) + #endif /* _ASM_PTRACE_H */ |