diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2012-09-26 20:16:47 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-10-29 21:25:13 +0100 |
commit | bec9b2b2c164455e2cd1103c9059d4f8e5926416 (patch) | |
tree | b982669b364fddab59d5c5c9950bcfdd86376d89 /arch/mips/include/asm/syscall.h | |
parent | MIPS: Enable HAVE_ARCH_TRACEHOOK. (diff) | |
download | linux-bec9b2b2c164455e2cd1103c9059d4f8e5926416.tar.xz linux-bec9b2b2c164455e2cd1103c9059d4f8e5926416.zip |
MIPS: Move audit_arch() helper function to __syscall_get_arch().
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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index 00f2ffaaf293..087df5f26f86 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h @@ -13,6 +13,8 @@ #ifndef __ASM_MIPS_SYSCALL_H #define __ASM_MIPS_SYSCALL_H +#include <linux/audit.h> +#include <linux/elf-em.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/uaccess.h> @@ -80,4 +82,16 @@ extern const unsigned long sys_call_table[]; extern const unsigned long sys32_call_table[]; extern const unsigned long sysn32_call_table[]; +static inline int __syscall_get_arch(void) +{ + int arch = EM_MIPS; +#ifdef CONFIG_64BIT + arch |= __AUDIT_ARCH_64BIT; +#endif +#if defined(__LITTLE_ENDIAN) + arch |= __AUDIT_ARCH_LE; +#endif + return arch; +} + #endif /* __ASM_MIPS_SYSCALL_H */ |