From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, bp@suse.de, mingo@kernel.org,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hpa@zytor.com, tglx@linutronix.de, paulmck@linux.vnet.ibm.com,
markus@trippelsdorf.de, torvalds@linux-foundation.org
Subject: [tip:x86/urgent] x86/microcode: Initialize the driver late when facilities are up
Date: Mon, 23 Nov 2015 08:28:16 -0800 [thread overview]
Message-ID: <tip-2d5be37d686c4dae8e60d20283d6f44ac2c44f65@git.kernel.org> (raw)
In-Reply-To: <20151120112400.GC4028@pd.tnic>
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
next prev parent reply other threads:[~2015-11-23 16:28 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 21:43 x86/microcode update on systems without INITRD Markus Trippelsdorf
2015-11-19 21:55 ` Borislav Petkov
2015-11-19 22:58 ` Borislav Petkov
2015-11-20 7:19 ` Markus Trippelsdorf
2015-11-20 8:27 ` Borislav Petkov
2015-11-20 8:33 ` Markus Trippelsdorf
2015-11-20 8:48 ` Borislav Petkov
2015-11-20 11:24 ` [PATCH] x86/microcode: Initialize the driver late when facilities are up Borislav Petkov
2015-11-23 16:28 ` tip-bot for Borislav Petkov [this message]
2016-01-07 12:12 ` x86/microcode update on systems without INITRD Thomas Voegtle
2016-01-07 12:18 ` Borislav Petkov
2016-01-07 12:36 ` Thomas Voegtle
2016-01-07 12:41 ` Markus Trippelsdorf
2016-01-08 9:33 ` Thomas Voegtle
2016-01-08 12:18 ` Mike Keehan
2016-01-08 12:20 ` Markus Trippelsdorf
2016-01-08 10:59 ` Borislav Petkov
2016-01-08 11:18 ` Måns Rullgård
2016-01-08 11:36 ` Borislav Petkov
2016-01-08 11:46 ` Måns Rullgård
2016-01-08 12:08 ` Borislav Petkov
2016-01-08 12:16 ` Markus Trippelsdorf
2016-01-08 12:27 ` Borislav Petkov
2016-01-08 12:28 ` Måns Rullgård
2016-01-08 12:48 ` Michal Marek
2016-01-08 13:37 ` Borislav Petkov
2016-01-08 14:48 ` Michal Marek
2016-01-11 19:43 ` Borislav Petkov
2016-01-11 20:29 ` Måns Rullgård
2016-01-11 20:59 ` Borislav Petkov
2016-01-11 21:04 ` Måns Rullgård
2016-01-11 21:17 ` Borislav Petkov
2016-01-14 18:43 ` [RFC PATCH] x86/kconfig: Sanity-check config file during oldconfig Borislav Petkov
2016-01-18 13:36 ` Thomas Voegtle
2016-01-18 14:06 ` Borislav Petkov
2016-01-18 14:11 ` Måns Rullgård
2016-01-18 14:28 ` Borislav Petkov
2016-01-18 14:41 ` Borislav Petkov
2016-01-18 14:51 ` Måns Rullgård
2016-01-18 15:39 ` Borislav Petkov
2016-01-18 15:42 ` Måns Rullgård
2016-01-19 8:20 ` [RFC] CONFIG_FORCE_MINIMALLY_SANE_CONFIG=y (was: Re: [RFC PATCH] x86/kconfig: Sanity-check config file during oldconfig) Ingo Molnar
2016-01-19 8:40 ` Markus Trippelsdorf
2016-01-19 8:54 ` Ingo Molnar
2016-01-19 9:45 ` Borislav Petkov
2016-01-19 9:01 ` Peter Zijlstra
2016-01-19 9:14 ` Ingo Molnar
2016-01-19 9:43 ` Borislav Petkov
2016-01-19 9:57 ` [RFC] CONFIG_FORCE_MINIMALLY_SANE_CONFIG=y Michal Marek
2016-01-19 10:30 ` [RFC] CONFIG_GENERIC_BOOTABLE_CONFIG=y Ingo Molnar
2016-01-19 17:22 ` Linus Torvalds
2016-01-19 17:52 ` Austin S. Hemmelgarn
2016-01-19 12:29 ` [RFC] CONFIG_FORCE_MINIMALLY_SANE_CONFIG=y Måns Rullgård
2016-01-19 12:43 ` Michal Marek
2016-01-19 12:57 ` Måns Rullgård
2016-01-21 22:06 ` [RFC] CONFIG_FORCE_MINIMALLY_SANE_CONFIG=y (was: Re: [RFC PATCH] x86/kconfig: Sanity-check config file during oldconfig) Kirill A. Shutemov
2016-03-09 13:08 ` Ingo Molnar
2016-01-08 12:18 ` x86/microcode update on systems without INITRD Måns Rullgård
2016-01-19 17:43 ` Borislav Petkov
2016-01-20 9:14 ` Thomas Voegtle
2016-01-20 11:15 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-2d5be37d686c4dae8e60d20283d6f44ac2c44f65@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).