aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/syscall.h
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-01-22 09:39:59 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-03-26 18:09:08 -0400
commit6e34574603f633fa67cf1037aa6374292469c74f (patch)
tree6acbdca176c0e543238055998e03ef2c4144849f /arch/mips/include/asm/syscall.h
parent22feadbe4c455491be5725bc7a6073b98db5db99 (diff)
MIPS: asm: syscall: Define syscall_get_arch
This effectively renames __syscall_get_arch to syscall_get_arch and implements a compatible interface for the seccomp API. The seccomp code (kernel/seccomp.c) expects a syscall_get_arch function to be defined for every architecture, so we drop the leading underscores from the existing function. This also makes use of the 'task' argument to determine the type the process instead of assuming the process has the same characteristics as the kernel it's running on. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6398/ 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 2981ef5bb092..08b639b1ca78 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -107,11 +107,13 @@ extern const unsigned long sys_call_table[];
107extern const unsigned long sys32_call_table[]; 107extern const unsigned long sys32_call_table[];
108extern const unsigned long sysn32_call_table[]; 108extern const unsigned long sysn32_call_table[];
109 109
110static inline int __syscall_get_arch(void) 110static inline int syscall_get_arch(struct task_struct *task,
111 struct pt_regs *regs)
111{ 112{
112 int arch = EM_MIPS; 113 int arch = EM_MIPS;
113#ifdef CONFIG_64BIT 114#ifdef CONFIG_64BIT
114 arch |= __AUDIT_ARCH_64BIT; 115 if (!test_tsk_thread_flag(task, TIF_32BIT_REGS))
116 arch |= __AUDIT_ARCH_64BIT;
115#endif 117#endif
116#if defined(__LITTLE_ENDIAN) 118#if defined(__LITTLE_ENDIAN)
117 arch |= __AUDIT_ARCH_LE; 119 arch |= __AUDIT_ARCH_LE;