From: Khalid Ali <khaliidcaliy@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
Khalid Ali <khaliidcaliy@gmail.com>
Subject: [PATCH] x86/kerrnel/FPU: clear MP bit of cr0
Date: Mon, 26 May 2025 08:22:44 +0000 [thread overview]
Message-ID: <20250526082414.689-1-khaliidcaliy@gmail.com> (raw)
From: Khalid Ali <khaliidcaliy@gmail.com>
Clear MP bit when initializing x87 FPU, since what it does
is making WAIT/FWAIT instructions to react to setting of TS flag.
Right now TS bit is cleared so MP should be cleared, as it is not
needed. This should set the bit in defined state.
Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
---
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 998a08f17e33..2a2b45610b74 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -30,7 +30,7 @@ static void fpu__init_cpu_generic(void)
cr4_set_bits(cr4_mask);
cr0 = read_cr0();
- cr0 &= ~(X86_CR0_TS|X86_CR0_EM); /* clear TS and EM */
+ cr0 &= ~(X86_CR0_TS|X86_CR0_EM|X86_CR0_MP); /* clear TS, EM and MP*/
if (!boot_cpu_has(X86_FEATURE_FPU))
cr0 |= X86_CR0_EM;
write_cr0(cr0);
--
2.49.0
next reply other threads:[~2025-05-26 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 8:22 Khalid Ali [this message]
2025-06-03 16:29 ` [PATCH] x86/kerrnel/FPU: clear MP bit of cr0 Dave Hansen
2025-06-04 22:35 ` H. Peter Anvin
2025-06-04 22:42 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250526082414.689-1-khaliidcaliy@gmail.com \
--to=khaliidcaliy@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).