Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75dddcbd authored by Eric Paris's avatar Eric Paris
Browse files

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent a9ebe0b9
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -14,8 +14,8 @@
#define _ASM_SYSCALL_H	1
#define _ASM_SYSCALL_H	1


#include <uapi/linux/audit.h>
#include <uapi/linux/audit.h>
#include <linux/compat.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/thread_info.h>


/* ftrace syscalls requires exporting the sys_call_table */
/* ftrace syscalls requires exporting the sys_call_table */
#ifdef CONFIG_FTRACE_SYSCALLS
#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)
static inline int syscall_get_arch(void)
{
{
	int arch = AUDIT_ARCH_PPC;
	return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;

#ifdef CONFIG_PPC64
	if (!is_32bit_task())
		arch = AUDIT_ARCH_PPC64;
#endif
	return arch;
}
}
#endif	/* _ASM_SYSCALL_H */
#endif	/* _ASM_SYSCALL_H */