From: Brian Gerst <brgerst@gmail.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
Brian Gerst <brgerst@gmail.com>
Subject: [PATCH] x86/asm: Remove CR4 read fault handler
Date: Sat, 5 Sep 2026 18:55:19 -0400 [thread overview]
Message-ID: <20260905225519.1002976-1-brgerst@gmail.com> (raw)
Remove the fault handler from native_read_cr4() since 486 support has
been removed.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/include/asm/special_insns.h | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 46aa2c9c1bda..6c80f69cf62b 100644
--- a/arch/x86/include/asm/special_insns.h
+++ b/arch/x86/include/asm/special_insns.h
@@ -46,20 +46,7 @@ static __always_inline void native_write_cr3(unsigned long val)
static inline unsigned long native_read_cr4(void)
{
unsigned long val;
-#ifdef CONFIG_X86_32
- /*
- * This could fault if CR4 does not exist. Non-existent CR4
- * is functionally equivalent to CR4 == 0. Keep it simple and pretend
- * that CR4 == 0 on CPUs that don't have CR4.
- */
- asm volatile("1: mov %%cr4, %0\n"
- "2:\n"
- _ASM_EXTABLE(1b, 2b)
- : "=r" (val) : "0" (0));
-#else
- /* CR4 always exists on x86_64. */
asm volatile("mov %%cr4,%0" : "=r" (val));
-#endif
return val;
}
base-commit: ea789738cbf82b72f5495cd1e2b231a917e0e6d5
--
2.55.0
reply other threads:[~2026-09-05 22:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260905225519.1002976-1-brgerst@gmail.com \
--to=brgerst@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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
all inboxes | Powered by JetHome®