public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Yu, Fenghua" <fenghua.yu@intel.com>,
	Torsten Kaiser <just.for.lkml@googlemail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Jacob Shin <jacob.shin@amd.com>,
	Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] x86, AMD: cleanup: merge common code in early microcode loading
Date: Thu, 8 Aug 2013 20:28:53 +0200	[thread overview]
Message-ID: <20130808182853.GD27974@pd.tnic> (raw)
In-Reply-To: <20130808100238.GA27974@pd.tnic>

On Thu, Aug 08, 2013 at 12:02:38PM +0200, Borislav Petkov wrote:
> On Wed, Aug 07, 2013 at 07:22:39PM -0700, H. Peter Anvin wrote:
> > How much does this matter?
> 
> I know what you're asking :-)
> 
> And no, it doesn't really matter as we fail in the patch version check
> so maybe only a comment will suffice here so that people don't get
> confused.

IOW, something like that:

---
From: Borislav Petkov <bp@suse.de>
Date: Thu, 8 Aug 2013 20:26:24 +0200
Subject: [PATCH] x86, microcode: Clarify loading on the AP

Hold it down why we're calling the AP microcode loading routine on the
BSP too, for future reference.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 25eb2747b063..58d37a27d317 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1226,8 +1226,12 @@ void cpu_init(void)
 	int i;
 
 	/*
-	 * Load microcode on this cpu if a valid microcode is available.
-	 * This is early microcode loading procedure.
+	 * Load microcode on this cpu if a valid microcode is available. This
+	 * is early microcode loading procedure. We execute this on the BSP too
+	 * but since a microcode has been potentially already applied on the
+	 * BSP, we will return prematurely here. It is easier to simply call it
+	 * again than filtering all the possible cases when we're not running
+	 * on the BSP.
 	 */
 	load_ucode_ap();
 
-- 
1.8.3

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  reply	other threads:[~2013-08-08 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 21:00 [PATCH 3/5] x86, AMD: cleanup: merge common code in early microcode loading Torsten Kaiser
2013-07-24 13:32 ` Borislav Petkov
2013-08-07 22:46   ` Yu, Fenghua
2013-08-07 23:34   ` Yu, Fenghua
2013-08-08  2:22     ` H. Peter Anvin
2013-08-08 10:02       ` Borislav Petkov
2013-08-08 18:28         ` Borislav Petkov [this message]
2013-08-09 18:44           ` Yu, Fenghua
2013-08-08 17:49     ` Borislav Petkov
2013-08-09 18:38       ` Yu, Fenghua

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=20130808182853.GD27974@pd.tnic \
    --to=bp@alien8.de \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=jacob.shin@amd.com \
    --cc=johannes.hirte@fem.tu-ilmenau.de \
    --cc=just.for.lkml@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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