Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932910AbbFVL6X (ORCPT ); Mon, 22 Jun 2015 07:58:23 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:35142 "EHLO mail-yh0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbbFVLzn (ORCPT ); Mon, 22 Jun 2015 07:55:43 -0400 From: Brian Gerst To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko , Andy Lutomirski Subject: [PATCH 02/12] x86/compat: Make mmap_is_ia32() common compat Date: Mon, 22 Jun 2015 07:55:11 -0400 Message-Id: <1434974121-32575-3-git-send-email-brgerst@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1434974121-32575-1-git-send-email-brgerst@gmail.com> References: <1434974121-32575-1-git-send-email-brgerst@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 37 TIF_ADDR32 is set for both ia32 and x32 tasks, so change from CONFIG_IA32_EMULATION to CONFIG_COMPAT. Use config_enabled() to make the function more readable. Signed-off-by: Brian Gerst --- arch/x86/include/asm/elf.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index f161c18..180b6fe 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -344,14 +344,9 @@ extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm, */ static inline int mmap_is_ia32(void) { -#ifdef CONFIG_X86_32 - return 1; -#endif -#ifdef CONFIG_IA32_EMULATION - if (test_thread_flag(TIF_ADDR32)) - return 1; -#endif - return 0; + return config_enabled(CONFIG_X86_32) || + (config_enabled(CONFIG_COMPAT) && + test_thread_flag(TIF_ADDR32)); } /* Do not change the values. See get_align_mask() */ -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/