Skip to content

Commit 9729017

Browse files
amlutoIngo Molnar
authored andcommitted
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 <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Matthew Whitehead <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: One Thousand Gnomes <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Yu-cheng Yu <[email protected]> Link: http://lkml.kernel.org/r/1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org Signed-off-by: Ingo Molnar <[email protected]>
1 parent 37ac78b commit 9729017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/fpu/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
7777
}
7878

7979
#ifndef CONFIG_MATH_EMULATION
80-
if (!boot_cpu_has(X86_FEATURE_FPU)) {
80+
if (!test_cpu_cap(&boot_cpu_data, X86_FEATURE_FPU)) {
8181
pr_emerg("x86/fpu: Giving up, no FPU found and no math emulation present\n");
8282
for (;;)
8383
asm volatile("hlt");

0 commit comments

Comments
 (0)