[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9f46c973be1f0209d8e1c6ad1dc96fd663aea330.1425066715.git.luto@amacapital.net>
Date: Fri, 27 Feb 2015 11:53:39 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>
Subject: [PATCH] x86_32: Initialize the cr4 shadow on cpu init
32-bit secondary cpus had uninitialized cr4 shadows, causing random
failures.
Reported-by: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Andy Lutomirski <luto@...capital.net>
---
This is embarrassing. I must have gotten lucky testing it.
arch/x86/kernel/cpu/common.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index b5c8ff5e9dfc..2346c95c6ab1 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);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists