aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/microcode_amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/microcode_amd.c')
-rw-r--r--arch/x86/kernel/microcode_amd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 03ea4e52e87a..62058e9c8b4e 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -304,12 +304,12 @@ static void * get_next_ucode(u8 *buf, unsigned int size,
304static int install_equiv_cpu_table(u8 *buf, 304static int install_equiv_cpu_table(u8 *buf,
305 int (*get_ucode_data)(void *, const void *, size_t)) 305 int (*get_ucode_data)(void *, const void *, size_t))
306{ 306{
307#define UCODE_HEADER_SIZE 12 307#define UCODE_CONTAINER_HEADER_SIZE 12
308 u8 *hdr[UCODE_HEADER_SIZE]; 308 u8 *container_hdr[UCODE_CONTAINER_HEADER_SIZE];
309 unsigned int *buf_pos = (unsigned int *)hdr; 309 unsigned int *buf_pos = (unsigned int *)container_hdr;
310 unsigned long size; 310 unsigned long size;
311 311
312 if (get_ucode_data(&hdr, buf, UCODE_HEADER_SIZE)) 312 if (get_ucode_data(&container_hdr, buf, UCODE_CONTAINER_HEADER_SIZE))
313 return 0; 313 return 0;
314 314
315 size = buf_pos[2]; 315 size = buf_pos[2];
@@ -326,14 +326,14 @@ static int install_equiv_cpu_table(u8 *buf,
326 return 0; 326 return 0;
327 } 327 }
328 328
329 buf += UCODE_HEADER_SIZE; 329 buf += UCODE_CONTAINER_HEADER_SIZE;
330 if (get_ucode_data(equiv_cpu_table, buf, size)) { 330 if (get_ucode_data(equiv_cpu_table, buf, size)) {
331 vfree(equiv_cpu_table); 331 vfree(equiv_cpu_table);
332 return 0; 332 return 0;
333 } 333 }
334 334
335 return size + UCODE_HEADER_SIZE; /* add header length */ 335 return size + UCODE_CONTAINER_HEADER_SIZE; /* add header length */
336#undef UCODE_HEADER_SIZE 336#undef UCODE_CONTAINER_HEADER_SIZE
337} 337}
338 338
339static void free_equiv_cpu_table(void) 339static void free_equiv_cpu_table(void)