summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2014-04-22 12:07:30 -0400
committerEric Paris <eparis@redhat.com>2014-09-23 16:21:27 -0400
commit75dddcbd9651eec29708f91149e405cd42cf68d7 (patch)
tree8462eeb1e9b88d0cd8196e848881b4ffb9565d2c /arch/powerpc
parenta9ebe0b98896b276a3a1664da5f40d3b7c92f316 (diff)
downloadlinux-stable-75dddcbd9651eec29708f91149e405cd42cf68d7.tar.gz
linux-stable-75dddcbd9651eec29708f91149e405cd42cf68d7.tar.bz2
linux-stable-75dddcbd9651eec29708f91149e405cd42cf68d7.zip
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/syscall.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index 427154444f6d..6fa2708da153 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 */