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>
This commit is contained in:
parent
309aac7776
commit
3da9b41794
|
@ -56,7 +56,6 @@ static struct cont_desc {
|
||||||
|
|
||||||
static u32 ucode_new_rev;
|
static u32 ucode_new_rev;
|
||||||
static u8 amd_ucode_patch[PATCH_MAX_SIZE];
|
static u8 amd_ucode_patch[PATCH_MAX_SIZE];
|
||||||
static u16 this_equiv_id;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Microcode patch container file is prepended to the initrd in cpio
|
* 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)
|
if (!desc.eq_id)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
this_equiv_id = desc.eq_id;
|
|
||||||
|
|
||||||
mc = desc.mc;
|
mc = desc.mc;
|
||||||
if (!mc)
|
if (!mc)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -375,7 +372,7 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
|
||||||
if (!eq_id)
|
if (!eq_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (eq_id == this_equiv_id) {
|
if (eq_id == cont.eq_id) {
|
||||||
mc = (struct microcode_amd *)amd_ucode_patch;
|
mc = (struct microcode_amd *)amd_ucode_patch;
|
||||||
|
|
||||||
if (mc && rev < mc->hdr.patch_id) {
|
if (mc && rev < mc->hdr.patch_id) {
|
||||||
|
|
Loading…
Reference in New Issue