Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562090

[PATCH v2 6/6] x86/fpu: Fix the "Giving up, no FPU found" test

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v2 6/6] x86/fpu: Fix the "Giving up, no FPU found" test
Date 2017-01-18 20:20 +0100
Message-ID <t13W3-83l-49@gated-at.bofh.it> (permalink)
References <t13W1-83l-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@kernel.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 23601db7b90f..08300d2b9c0f 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -79,7 +79,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");
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 6/6] x86/fpu: Fix the "Giving up, no FPU found" test Andy Lutomirski <luto@kernel.org> - 2017-01-18 20:20 +0100
  [tip:x86/fpu] x86/fpu: Fix the "Giving up, no FPU found" test tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2017-01-25 12:50 +0100

csiph-web