]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/sh/include/asm/syscall_64.h
Merge tag 'master-2014-12-01' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
[karo-tx-linux.git] / arch / sh / include / asm / syscall_64.h
index c3561ca72bee9fb284dbe52b823da3ca6feadbc0..c6a797b90b8052f1dfc879a41f722c2fabac8c63 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __ASM_SH_SYSCALL_64_H
 #define __ASM_SH_SYSCALL_64_H
 
+#include <uapi/linux/audit.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <asm/ptrace.h>
@@ -61,4 +62,17 @@ static inline void syscall_set_arguments(struct task_struct *task,
        memcpy(&regs->regs[2 + i], args, n * sizeof(args[0]));
 }
 
+static inline int syscall_get_arch(void)
+{
+       int arch = AUDIT_ARCH_SH;
+
+#ifdef CONFIG_64BIT
+       arch |= __AUDIT_ARCH_64BIT;
+#endif
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+       arch |= __AUDIT_ARCH_LE;
+#endif
+
+       return arch;
+}
 #endif /* __ASM_SH_SYSCALL_64_H */