diff options
author | Borislav Petkov <bp@suse.de> | 2015-11-20 06:24:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-11-23 04:39:49 -0500 |
commit | 2d5be37d686c4dae8e60d20283d6f44ac2c44f65 (patch) | |
tree | 3dec14e58bff0cde0b2307996c118ea5d749d327 | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) |
x86/microcode: Initialize the driver late when facilities are up
Running microcode_init() from setup_arch() is a bad idea because
not even kmalloc() is ready at that point and the loader does
all kinds of allocations and init/registration with various
subsystems.
Make it a late initcall when required facilities are initialized
so that the microcode driver initialization can succeed too.
Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20151120112400.GC4028@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/microcode/core.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index 7fc27f1cca58..b3e94ef461fd 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
@@ -698,3 +698,4 @@ int __init microcode_init(void) | |||
698 | return error; | 698 | return error; |
699 | 699 | ||
700 | } | 700 | } |
701 | late_initcall(microcode_init); | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 29db25f9a745..d2bbe343fda7 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1250,8 +1250,6 @@ void __init setup_arch(char **cmdline_p) | |||
1250 | if (efi_enabled(EFI_BOOT)) | 1250 | if (efi_enabled(EFI_BOOT)) |
1251 | efi_apply_memmap_quirks(); | 1251 | efi_apply_memmap_quirks(); |
1252 | #endif | 1252 | #endif |
1253 | |||
1254 | microcode_init(); | ||
1255 | } | 1253 | } |
1256 | 1254 | ||
1257 | #ifdef CONFIG_X86_32 | 1255 | #ifdef CONFIG_X86_32 |