From: Torsten Kaiser <just.for.lkml@googlemail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Borislav Petkov <bp@alien8.de>, Jacob Shin <jacob.shin@amd.com>,
Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] x86, AMD: fix error path in apply_microcode_amd()
Date: Tue, 23 Jul 2013 22:58:23 +0200 [thread overview]
Message-ID: <20130723225823.2e4e7588@googlemail.com> (raw)
Return -1 (like Intels apply_microcode) when the loading fails, also
do not set the active microcode level on failure.
Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>
--- a/arch/x86/kernel/microcode_amd.c 2013-07-23 19:42:16.089517717 +0200
+++ b/arch/x86/kernel/microcode_amd.c 2013-07-23 19:43:30.359517091 +0200
@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu)
return 0;
}
- if (__apply_microcode_amd(mc_amd))
+ if (__apply_microcode_amd(mc_amd)) {
pr_err("CPU%d: update failed for patch_level=0x%08x\n",
cpu, mc_amd->hdr.patch_id);
- else
- pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
- mc_amd->hdr.patch_id);
+ return -1;
+ }
+ pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
+ mc_amd->hdr.patch_id);
uci->cpu_sig.rev = mc_amd->hdr.patch_id;
c->microcode = mc_amd->hdr.patch_id;
next reply other threads:[~2013-07-23 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 20:58 Torsten Kaiser [this message]
2013-07-24 8:00 ` [PATCH 1/5] x86, AMD: fix error path in apply_microcode_amd() Borislav Petkov
2013-07-31 17:30 ` [tip:x86/urgent] x86, amd, microcode: Fix " tip-bot for Torsten Kaiser
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=20130723225823.2e4e7588@googlemail.com \
--to=just.for.lkml@googlemail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jacob.shin@amd.com \
--cc=johannes.hirte@fem.tu-ilmenau.de \
--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