From bec9b2b2c164455e2cd1103c9059d4f8e5926416 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 26 Sep 2012 20:16:47 +0200 Subject: MIPS: Move audit_arch() helper function to __syscall_get_arch(). Signed-off-by: Ralf Baechle --- arch/mips/include/asm/syscall.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/mips/include/asm/syscall.h') 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 +#include #include #include #include @@ -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 */ -- cgit