projects/linux·commit 27441d76

x86/asm: Remove CR4 read fault handler

27441d76 · Brian Gerst <[email protected]> · 2026-09-05 18:55:19 -04:00

Remove the fault handler from native_read_cr4() since 486 support has
been removed.

Signed-off-by: Brian Gerst <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Commit
27441d76b3d6604de9162c4c24d034bcfe3249de
Parents
2c6a75ad

Changes

1 files changed · +0 −13

FileStatusAddDelContent
arch/x86/include/asm/special_insns.hmodified+0−13View file

arch/x86/include/asm/special_insns.h

View file
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 46aa2c9..6c80f69 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;
}