x86: Init per-cpu shadow copy of CR4 on 32-bit CPUs too
Changes
1 files changed · +6 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| arch/x86/kernel/cpu/common.c | modified | +6 | −0 | View file |
arch/x86/kernel/cpu/common.c
View filediff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index b5c8ff5..2346c95 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1396,6 +1396,12 @@ void cpu_init(void)
wait_for_master_cpu(cpu);
+ /*
+ * Initialize the CR4 shadow before doing anything that could
+ * try to read it.
+ */
+ cr4_init_shadow();
+
show_ucode_info_early();
printk(KERN_INFO "Initializing CPU#%d\n", cpu);