]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: Move is_32bit_task
authorAnton Blanchard <anton@samba.org>
Sun, 22 Feb 2009 01:49:58 +0000 (01:49 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 23 Feb 2009 04:53:06 +0000 (15:53 +1100)
Move is_32bit_task into asm/thread_info.h, that allows us to test for
32/64bit tasks without an ugly CONFIG_PPC64 ifdef.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/thread_info.h
arch/powerpc/kernel/signal.h

index 9665a26a253aaef0c118b644ec6635f96b84a83f..995ab7b80f69e0aa4ac0538cb6d17cc8d36cdcb6 100644 (file)
@@ -154,6 +154,13 @@ static inline void set_restore_sigmask(void)
        ti->local_flags |= _TLF_RESTORE_SIGMASK;
        set_bit(TIF_SIGPENDING, &ti->flags);
 }
+
+#ifdef CONFIG_PPC64
+#define is_32bit_task()        (test_thread_flag(TIF_32BIT))
+#else
+#define is_32bit_task()        (1)
+#endif
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
index b427bf8e1d8fa440b714f730240ceca78ef7b850..f1442d69d4ece864af55c1e7889d01145dfc046f 100644 (file)
@@ -39,22 +39,12 @@ extern unsigned long copy_vsx_from_user(struct task_struct *task,
 
 #ifdef CONFIG_PPC64
 
-static inline int is_32bit_task(void)
-{
-       return test_thread_flag(TIF_32BIT);
-}
-
 extern int handle_rt_signal64(int signr, struct k_sigaction *ka,
                              siginfo_t *info, sigset_t *set,
                              struct pt_regs *regs);
 
 #else /* CONFIG_PPC64 */
 
-static inline int is_32bit_task(void)
-{
-       return 1;
-}
-
 static inline int handle_rt_signal64(int signr, struct k_sigaction *ka,
                                     siginfo_t *info, sigset_t *set,
                                     struct pt_regs *regs)