diff options
author | Eric Paris <eparis@redhat.com> | 2014-03-11 21:41:04 +0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-09-24 00:20:01 +0400 |
commit | 37d181bbfe387346b00bd722acfdf93685ac73b3 (patch) | |
tree | 8411accdca930539ea89055565d8e244d0dbc35d /arch/sh/include/asm/syscall_32.h | |
parent | 1002d94d30765b1faf0840adef9ed7e6b7aa5783 (diff) | |
download | linux-37d181bbfe387346b00bd722acfdf93685ac73b3.tar.xz |
SH: define syscall_get_arch() for superh
This patch defines syscall_get_arch() for the superh platform. It does
so in both syscall_32.h and syscall_64.h. I'm not certain if the
implementation in syscall_64.h couldn't just be used in syscall.h as I
can't really track the setting of CONFIG_64BIT...
This way is safe, but we might be able to combine these if a superh
person were able to review...
[v2]
fixed indentation stoopidity (Sergei Shtylyov)
use AUDIT_ARCH_SH instead of EM_SH
Based-on-patch-by: Richard Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: linux-sh@vger.kernel.org
Diffstat (limited to 'arch/sh/include/asm/syscall_32.h')
-rw-r--r-- | arch/sh/include/asm/syscall_32.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/include/asm/syscall_32.h b/arch/sh/include/asm/syscall_32.h index 7d80df4f09cb..95be3b0ce0ac 100644 --- a/arch/sh/include/asm/syscall_32.h +++ b/arch/sh/include/asm/syscall_32.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_SYSCALL_32_H #define __ASM_SH_SYSCALL_32_H +#include <uapi/linux/audit.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/err.h> @@ -93,4 +94,13 @@ static inline void syscall_set_arguments(struct task_struct *task, } } +static inline int syscall_get_arch(void) +{ + int arch = AUDIT_ARCH_SH; + +#ifdef CONFIG_CPU_LITTLE_ENDIAN + arch |= __AUDIT_ARCH_LE; +#endif + return arch; +} #endif /* __ASM_SH_SYSCALL_32_H */ |