Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755891AbbGFPr3 (ORCPT ); Mon, 6 Jul 2015 11:47:29 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49620 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755856AbbGFPrZ (ORCPT ); Mon, 6 Jul 2015 11:47:25 -0400 Date: Mon, 6 Jul 2015 08:46:40 -0700 From: tip-bot for Brian Gerst Message-ID: Cc: dvlasenk@redhat.com, bp@alien8.de, linux-kernel@vger.kernel.org, tglx@linutronix.de, luto@amacapital.net, peterz@infradead.org, mingo@kernel.org, brgerst@gmail.com, hpa@zytor.com, torvalds@linux-foundation.org Reply-To: tglx@linutronix.de, luto@amacapital.net, linux-kernel@vger.kernel.org, bp@alien8.de, dvlasenk@redhat.com, torvalds@linux-foundation.org, hpa@zytor.com, brgerst@gmail.com, mingo@kernel.org, peterz@infradead.org In-Reply-To: <1434974121-32575-3-git-send-email-brgerst@gmail.com> References: <1434974121-32575-3-git-send-email-brgerst@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/compat: Make mmap_is_ia32() common compat Git-Commit-ID: b2e02b820d5b42479195b89d3d73f31bcedb264e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1946 Lines: 54 Commit-ID: b2e02b820d5b42479195b89d3d73f31bcedb264e Gitweb: http://git.kernel.org/tip/b2e02b820d5b42479195b89d3d73f31bcedb264e Author: Brian Gerst AuthorDate: Mon, 22 Jun 2015 07:55:11 -0400 Committer: Ingo Molnar CommitDate: Mon, 6 Jul 2015 15:28:55 +0200 x86/compat: Make mmap_is_ia32() common compat 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 Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1434974121-32575-3-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar --- 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() */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/