lkml.org 
[lkml]   [2017]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/mce] x86/microcode/AMD: Get rid of global this_equiv_id
Commit-ID:  3da9b41794590022d09caa345aaa7c812ac22971
Gitweb: http://git.kernel.org/tip/3da9b41794590022d09caa345aaa7c812ac22971
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 20 Jan 2017 21:29:48 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 23 Jan 2017 10:02:48 +0100

x86/microcode/AMD: Get rid of global this_equiv_id

We have a container which we update/prepare each time before applying a
microcode patch instead of using a global.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-10-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
arch/x86/kernel/cpu/microcode/amd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 9fb398e..4cbfe70 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -56,7 +56,6 @@ static struct cont_desc {

static u32 ucode_new_rev;
static u8 amd_ucode_patch[PATCH_MAX_SIZE];
-static u16 this_equiv_id;

/*
* Microcode patch container file is prepended to the initrd in cpio
@@ -228,8 +227,6 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size,
if (!desc.eq_id)
return ret;

- this_equiv_id = desc.eq_id;
-
mc = desc.mc;
if (!mc)
return ret;
@@ -375,7 +372,7 @@ reget:
if (!eq_id)
return;

- if (eq_id == this_equiv_id) {
+ if (eq_id == cont.eq_id) {
mc = (struct microcode_amd *)amd_ucode_patch;

if (mc && rev < mc->hdr.patch_id) {
\
 
 \ /
  Last update: 2017-01-23 10:12    [W:0.125 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site