Commit 881e23e5 authored by Borislav Petkov's avatar Borislav Petkov

x86, microcode: Correct microcode revision format

506ed6b5 ("x86, intel: Output microcode revision in /proc/cpuinfo")
added microcode revision format to /proc/cpuinfo and the MCE handler in
decimal format but both AMD and Intel patch levels are handled as hex
numbers. Fix it.
Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent ca8bc8dc
...@@ -221,7 +221,7 @@ static void print_mce(struct mce *m) ...@@ -221,7 +221,7 @@ static void print_mce(struct mce *m)
* Note this output is parsed by external tools and old fields * Note this output is parsed by external tools and old fields
* should not be changed. * should not be changed.
*/ */
pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x microcode %u\n", pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x microcode %x\n",
m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid, m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid,
cpu_data(m->extcpu).microcode); cpu_data(m->extcpu).microcode);
......
...@@ -86,7 +86,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -86,7 +86,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
else else
seq_printf(m, "stepping\t: unknown\n"); seq_printf(m, "stepping\t: unknown\n");
if (c->microcode) if (c->microcode)
seq_printf(m, "microcode\t: %u\n", c->microcode); seq_printf(m, "microcode\t: 0x%x\n", c->microcode);
if (cpu_has(c, X86_FEATURE_TSC)) { if (cpu_has(c, X86_FEATURE_TSC)) {
unsigned int freq = cpufreq_quick_get(cpu); unsigned int freq = cpufreq_quick_get(cpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment