aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-09 15:16:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-14 19:31:30 -0400
commitbaf9ff74eda9f0efcc8a68e8a9c9d183be13a810 (patch)
tree4edd32d85cae4ef850973214a922c376537991c3 /arch/mips/include/asm
parent8f54bcacbc39f883bde2210cf2754e5d198f55a4 (diff)
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')
-rw-r--r--arch/mips/include/asm/ptrace.h6
-rw-r--r--arch/mips/include/asm/unistd.h2
2 files changed, 8 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)
61 die(str, regs); 61 die(str, regs);
62} 62}
63 63
64#define current_pt_regs() \
65({ \
66 unsigned long sp = (unsigned long)__builtin_frame_address(0); \
67 (struct pt_regs *)((sp | (THREAD_SIZE - 1)) + 1 - 32) - 1; \
68})
69
64#endif /* _ASM_PTRACE_H */ 70#endif /* _ASM_PTRACE_H */
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index 9e47cc11aa26..8ae908c66e59 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -18,8 +18,10 @@
18#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
19 19
20#define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 20#define __ARCH_OMIT_COMPAT_SYS_GETDENTS64
21#define __ARCH_WANT_KERNEL_EXECVE
21#define __ARCH_WANT_OLD_READDIR 22#define __ARCH_WANT_OLD_READDIR
22#define __ARCH_WANT_SYS_ALARM 23#define __ARCH_WANT_SYS_ALARM
24#define __ARCH_WANT_SYS_EXECVE
23#define __ARCH_WANT_SYS_GETHOSTNAME 25#define __ARCH_WANT_SYS_GETHOSTNAME
24#define __ARCH_WANT_SYS_IPC 26#define __ARCH_WANT_SYS_IPC
25#define __ARCH_WANT_SYS_PAUSE 27#define __ARCH_WANT_SYS_PAUSE