diff options
author | Eric Paris <eparis@redhat.com> | 2014-04-22 16:07:30 (GMT) |
---|---|---|
committer | Honghua Yin <Hong-Hua.Yin@freescale.com> | 2015-03-30 09:21:48 (GMT) |
commit | 706e8506db6e4ae12f319f2f69b75e47c49ffbfe (patch) | |
tree | 6598bd19837e87a662414f2da6ba2c394ee95663 /arch/powerpc | |
parent | b60f6873f5db357aefb8979753cc7f4eb0dff96e (diff) | |
download | linux-fsl-qoriq-706e8506db6e4ae12f319f2f69b75e47c49ffbfe.tar.xz |
sparc: simplify syscall_get_arch()
Include linux/thread_info.h so we can use is_32_bit_task() cleanly.
Then just simplify syscall_get_arch() since is_32_bit_task() works for
all configuration options.
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Paris <eparis@redhat.com>
(cherry picked from commit 75dddcbd9651eec29708f91149e405cd42cf68d7)
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Change-Id: Ie3eb2b996101ff3fbd8e3d44c708cd0d94bfb9f3
Reviewed-on: http://git.am.freescale.net:8181/33025
Tested-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/syscall.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h index fd26ab1..6240698 100644 --- a/arch/powerpc/include/asm/syscall.h +++ b/arch/powerpc/include/asm/syscall.h @@ -14,8 +14,8 @@ #define _ASM_SYSCALL_H 1 #include <uapi/linux/audit.h> -#include <linux/compat.h> #include <linux/sched.h> +#include <linux/thread_info.h> /* ftrace syscalls requires exporting the sys_call_table */ #ifdef CONFIG_FTRACE_SYSCALLS @@ -90,12 +90,6 @@ static inline void syscall_set_arguments(struct task_struct *task, static inline int syscall_get_arch(void) { - int arch = AUDIT_ARCH_PPC; - -#ifdef CONFIG_PPC64 - if (!is_32bit_task()) - arch = AUDIT_ARCH_PPC64; -#endif - return arch; + return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64; } #endif /* _ASM_SYSCALL_H */ |