Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1564804
| From | tip-bot for Borislav Petkov <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/mce] x86/microcode/AMD: Remove struct cont_desc.eq_id |
| Date | 2017-01-23 10:20 +0100 |
| Message-ID | <t2IX8-4Ae-31@gated-at.bofh.it> (permalink) |
| References | <t1O8x-3uV-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: da0aa3dde05108e180eecd76534c55f43ea4b9c8
Gitweb: http://git.kernel.org/tip/da0aa3dde05108e180eecd76534c55f43ea4b9c8
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 20 Jan 2017 21:29:55 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 23 Jan 2017 10:02:51 +0100
x86/microcode/AMD: Remove struct cont_desc.eq_id
The equivalence ID was needed outside of the container scanning logic
but now, after this has been cleaned up, not anymore. Now, cont_desc.mc
is used to denote whether the container we're looking at has the proper
microcode patch for this CPU or not.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-17-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/microcode/amd.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 5e1b577..7889ae4 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -49,7 +49,6 @@ struct cont_desc {
struct microcode_amd *mc;
u32 cpuid_1_eax;
u32 psize;
- u16 eq_id;
u8 *data;
size_t size;
};
@@ -92,10 +91,8 @@ static ssize_t parse_container(u8 *ucode, ssize_t size, struct cont_desc *desc)
/* Am I looking at an equivalence table header? */
if (hdr[0] != UCODE_MAGIC ||
hdr[1] != UCODE_EQUIV_CPU_TABLE_TYPE ||
- hdr[2] == 0) {
- desc->eq_id = 0;
+ hdr[2] == 0)
return CONTAINER_HDR_SZ;
- }
buf = ucode;
@@ -147,9 +144,8 @@ static ssize_t parse_container(u8 *ucode, ssize_t size, struct cont_desc *desc)
* buffer.
*/
if (desc->mc) {
- desc->eq_id = eq_id;
- desc->data = ucode;
- desc->size = orig_size - size;
+ desc->data = ucode;
+ desc->size = orig_size - size;
return 0;
}
@@ -220,8 +216,6 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_p
desc.cpuid_1_eax = cpuid_1_eax;
scan_containers(ucode, size, &desc);
- if (!desc.eq_id)
- return ret;
mc = desc.mc;
if (!mc)
@@ -341,7 +335,7 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
desc.cpuid_1_eax = cpuid_1_eax;
scan_containers(cp.data, cp.size, &desc);
- if (!desc.eq_id)
+ if (!desc.mc)
return -EINVAL;
ret = load_microcode_amd(smp_processor_id(), x86_family(cpuid_1_eax),
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 16/16] x86/microcode/AMD: Remove struct cont_desc.eq_id Borislav Petkov <bp@alien8.de> - 2017-01-20 21:40 +0100 [tip:x86/mce] x86/microcode/AMD: Remove struct cont_desc.eq_id tip-bot for Borislav Petkov <tipbot@zytor.com> - 2017-01-23 10:20 +0100
csiph-web