From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbdAYLoX (ORCPT ); Wed, 25 Jan 2017 06:44:23 -0500 Received: from terminus.zytor.com ([65.50.211.136]:49282 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdAYLoW (ORCPT ); Wed, 25 Jan 2017 06:44:22 -0500 Date: Wed, 25 Jan 2017 03:43:07 -0800 From: tip-bot for Andy Lutomirski Message-ID: Cc: hpa@zytor.com, yu-cheng.yu@intel.com, gnomes@lxorguk.ukuu.org.uk, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org, bp@suse.de, bp@alien8.de, mingo@kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, oleg@redhat.com, riel@redhat.com, peterz@infradead.org, tedheadster@gmail.com, luto@kernel.org, fenghua.yu@intel.com, brgerst@gmail.com Reply-To: linux-kernel@vger.kernel.org, yu-cheng.yu@intel.com, dave.hansen@linux.intel.com, gnomes@lxorguk.ukuu.org.uk, hpa@zytor.com, bp@suse.de, bp@alien8.de, oleg@redhat.com, riel@redhat.com, mingo@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, brgerst@gmail.com, tedheadster@gmail.com, peterz@infradead.org, fenghua.yu@intel.com, luto@kernel.org In-Reply-To: <1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org> References: <1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/fpu] x86/fpu: Fix the "Giving up, no FPU found" test Git-Commit-ID: 9729017f844431ab2800519297d8d1b0ecbc420d 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 Commit-ID: 9729017f844431ab2800519297d8d1b0ecbc420d Gitweb: http://git.kernel.org/tip/9729017f844431ab2800519297d8d1b0ecbc420d Author: Andy Lutomirski AuthorDate: Wed, 18 Jan 2017 11:15:42 -0800 Committer: Ingo Molnar CommitDate: Wed, 25 Jan 2017 10:12:44 +0100 x86/fpu: Fix the "Giving up, no FPU found" test We would never print "Giving up, no FPU found" because X86_FEATURE_FPU was in REQUIRED_MASK on non-FPU-emulating builds, so the boot_cpu_has() test didn't do anything. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matthew Whitehead Cc: Oleg Nesterov Cc: One Thousand Gnomes Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/kernel/fpu/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index 8b526c5..19bdd1b 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -77,7 +77,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c) } #ifndef CONFIG_MATH_EMULATION - if (!boot_cpu_has(X86_FEATURE_FPU)) { + if (!test_cpu_cap(&boot_cpu_data, X86_FEATURE_FPU)) { pr_emerg("x86/fpu: Giving up, no FPU found and no math emulation present\n"); for (;;) asm volatile("hlt");