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

Commit a17c8b54 authored by Eric Paris's avatar Eric Paris
Browse files

sparc: implement is_32bit_task



We are currently embedding the same check from thread_info.h into
syscall.h thanks to the way syscall_get_arch() was implemented in the
audit tree.  Instead create a new function, is_32bit_task() which is
similar to that found on the powerpc arch.  This simplifies the
syscall.h code and makes the build/Kconfig requirements much easier
to understand.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: sparclinux@vger.kernel.org
parent 01ed102c
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -128,12 +128,7 @@ static inline void syscall_set_arguments(struct task_struct *task,


static inline int syscall_get_arch(void)
static inline int syscall_get_arch(void)
{
{
#if defined(__sparc__) && defined(__arch64__)
	return is_32bit_task() ? AUDIT_ARCH_SPARC : AUDIT_ARCH_SPARC64;
	return test_thread_flag(TIF_32BIT) ? AUDIT_ARCH_SPARC
					   : AUDIT_ARCH_SPARC64;
#else
	return AUDIT_ARCH_SPARC;
#endif
}
}


#endif /* __ASM_SPARC_SYSCALL_H */
#endif /* __ASM_SPARC_SYSCALL_H */
+2 −0
Original line number Original line Diff line number Diff line
@@ -130,6 +130,8 @@ register struct thread_info *current_thread_info_reg asm("g6");
#define _TIF_DO_NOTIFY_RESUME_MASK	(_TIF_NOTIFY_RESUME | \
#define _TIF_DO_NOTIFY_RESUME_MASK	(_TIF_NOTIFY_RESUME | \
					 _TIF_SIGPENDING)
					 _TIF_SIGPENDING)


#define is_32bit_task()	(1)

#endif /* __KERNEL__ */
#endif /* __KERNEL__ */


#endif /* _ASM_THREAD_INFO_H */
#endif /* _ASM_THREAD_INFO_H */
+2 −0
Original line number Original line Diff line number Diff line
@@ -219,6 +219,8 @@ register struct thread_info *current_thread_info_reg asm("g6");
				 _TIF_NEED_RESCHED)
				 _TIF_NEED_RESCHED)
#define _TIF_DO_NOTIFY_RESUME_MASK	(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)
#define _TIF_DO_NOTIFY_RESUME_MASK	(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)


#define is_32bit_task()	(test_thread_flag(TIF_32BIT))

/*
/*
 * Thread-synchronous status.
 * Thread-synchronous status.
 *
 *