Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1275580

[tip:x86/urgent] x86/microcode: Initialize the driver late when facilities are up

From tip-bot for Borislav Petkov <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:x86/urgent] x86/microcode: Initialize the driver late when facilities are up
Date 2015-11-23 17:30 +0100
Message-ID <qy2a7-4i0-39@gated-at.bofh.it> (permalink)
References <qwS38-6xE-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  2d5be37d686c4dae8e60d20283d6f44ac2c44f65
Gitweb:     http://git.kernel.org/tip/2d5be37d686c4dae8e60d20283d6f44ac2c44f65
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 20 Nov 2015 12:24:00 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 23 Nov 2015 10:39:49 +0100

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>
---
 arch/x86/kernel/cpu/microcode/core.c | 1 +
 arch/x86/kernel/setup.c              | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 7fc27f1..b3e94ef 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)
 	return error;
 
 }
+late_initcall(microcode_init);
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 29db25f..d2bbe34 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1250,8 +1250,6 @@ void __init setup_arch(char **cmdline_p)
 	if (efi_enabled(EFI_BOOT))
 		efi_apply_memmap_quirks();
 #endif
-
-	microcode_init();
 }
 
 #ifdef CONFIG_X86_32
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

x86/microcode update on systems without INITRD Markus Trippelsdorf <markus@trippelsdorf.de> - 2015-11-19 22:50 +0100
  Re: x86/microcode update on systems without INITRD Borislav Petkov <bp@suse.de> - 2015-11-19 23:00 +0100
    Re: x86/microcode update on systems without INITRD Borislav Petkov <bp@suse.de> - 2015-11-20 00:00 +0100
      Re: x86/microcode update on systems without INITRD Markus Trippelsdorf <markus@trippelsdorf.de> - 2015-11-20 08:20 +0100
        Re: x86/microcode update on systems without INITRD Borislav Petkov <bp@suse.de> - 2015-11-20 09:30 +0100
          Re: x86/microcode update on systems without INITRD Markus Trippelsdorf <markus@trippelsdorf.de> - 2015-11-20 09:40 +0100
            Re: x86/microcode update on systems without INITRD Borislav Petkov <bp@suse.de> - 2015-11-20 09:50 +0100
              [PATCH] x86/microcode: Initialize the driver late when facilities  are up Borislav Petkov <bp@suse.de> - 2015-11-20 12:30 +0100
                [tip:x86/urgent] x86/microcode:   Initialize the driver late when facilities are up tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-11-23 17:30 +0100

csiph-web