From patchwork Sun Feb 22 11:49:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 23527 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 8B303DE132 for ; Sun, 22 Feb 2009 23:04:06 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1010) id 272ACDDD0B; Sun, 22 Feb 2009 23:01:37 +1100 (EST) Resent-From: anton@kryten Resent-Date: Sun, 22 Feb 2009 22:58:54 +1100 Resent-Message-ID: <20090222115854.GB12006@kryten> Resent-To: linuxppc-dev@ozlabs.org Message-Id: <20090222115331.774772471@samba.org> References: <20090222114957.213647384@samba.org> User-Agent: quilt/0.46-1 Date: Sun, 22 Feb 2009 22:49:58 +1100 From: Anton Blanchard To: linuxppc-dev@ozlabs.org Subject: [patch 01/10] powerpc: Move is_32bit_task Content-Disposition: inline; filename=move_is_32bit_task.patch X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 Index: linux-2.6/arch/powerpc/include/asm/thread_info.h =================================================================== --- linux-2.6.orig/arch/powerpc/include/asm/thread_info.h 2009-02-20 13:44:37.000000000 +1100 +++ linux-2.6/arch/powerpc/include/asm/thread_info.h 2009-02-20 16:03:02.000000000 +1100 @@ -154,6 +154,13 @@ 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: linux-2.6/arch/powerpc/kernel/signal.h =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/signal.h 2009-02-20 13:44:34.000000000 +1100 +++ linux-2.6/arch/powerpc/kernel/signal.h 2009-02-20 13:45:33.000000000 +1100 @@ -39,22 +39,12 @@ #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)