Skip to content

Commit 2d5be37

Browse files
suryasaimadhuingomolnar
authored andcommitted
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>
1 parent 1ec2183 commit 2d5be37

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

arch/x86/kernel/cpu/microcode/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,3 +698,4 @@ int __init microcode_init(void)
698698
return error;
699699

700700
}
701+
late_initcall(microcode_init);

arch/x86/kernel/setup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,6 @@ void __init setup_arch(char **cmdline_p)
12501250
if (efi_enabled(EFI_BOOT))
12511251
efi_apply_memmap_quirks();
12521252
#endif
1253-
1254-
microcode_init();
12551253
}
12561254

12571255
#ifdef CONFIG_X86_32

0 commit comments

Comments
 (0)