[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-9729017f844431ab2800519297d8d1b0ecbc420d@git.kernel.org>
Date: Wed, 25 Jan 2017 03:43:07 -0800
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, yu-cheng.yu@...el.com, gnomes@...rguk.ukuu.org.uk,
dave.hansen@...ux.intel.com, linux-kernel@...r.kernel.org,
bp@...e.de, bp@...en8.de, mingo@...nel.org,
torvalds@...ux-foundation.org, tglx@...utronix.de, oleg@...hat.com,
riel@...hat.com, peterz@...radead.org, tedheadster@...il.com,
luto@...nel.org, fenghua.yu@...el.com, brgerst@...il.com
Subject: [tip:x86/fpu] x86/fpu: Fix the "Giving up, no FPU found" test
Commit-ID: 9729017f844431ab2800519297d8d1b0ecbc420d
Gitweb: http://git.kernel.org/tip/9729017f844431ab2800519297d8d1b0ecbc420d
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Wed, 18 Jan 2017 11:15:42 -0800
Committer: Ingo Molnar <mingo@...nel.org>
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 <luto@...nel.org>
Reviewed-by: Borislav Petkov <bp@...e.de>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Matthew Whitehead <tedheadster@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@...el.com>
Link: http://lkml.kernel.org/r/1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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");
Powered by blists - more mailing lists