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


Groups > linux.kernel > #1562090 > unrolled thread

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

Started byAndy Lutomirski <luto@kernel.org>
First post2017-01-18 20:20 +0100
Last post2017-01-25 12:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [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

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

FromAndy Lutomirski <luto@kernel.org>
Date2017-01-18 20:20 +0100
Subject[PATCH v2 6/6] x86/fpu: Fix the "Giving up, no FPU found" test
Message-ID<t13W3-83l-49@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1566522 — [tip:x86/fpu] x86/fpu: Fix the "Giving up, no FPU found" test

Fromtip-bot for Andy Lutomirski <tipbot@zytor.com>
Date2017-01-25 12:50 +0100
Subject[tip:x86/fpu] x86/fpu: Fix the "Giving up, no FPU found" test
Message-ID<t3ufo-1eA-11@gated-at.bofh.it>
In reply to#1562090
Commit-ID:  9729017f844431ab2800519297d8d1b0ecbc420d
Gitweb:     http://git.kernel.org/tip/9729017f844431ab2800519297d8d1b0ecbc420d
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Wed, 18 Jan 2017 11:15:42 -0800
Committer:  Ingo Molnar <mingo@kernel.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@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Whitehead <tedheadster@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
Link: http://lkml.kernel.org/r/1499077fa76f0f84b8ea28e37d3fa70beca4e310.1484705016.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@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 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");

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web