Fix date output in x86 microcode driver.
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 12 Aug 2008 12:25:44 +0000 (13:25 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 13 Aug 2008 16:54:56 +0000 (18:54 +0200)
The microcode stores its date in a uint32_t in some weird order
approximating pdp-endian. Rather than printing it like that, print it
properly in ISO standard form.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/microcode_intel.c

index a61986e..d2d9d74 100644 (file)
@@ -339,8 +339,11 @@ static void apply_microcode(int cpu)
                return;
        }
        printk(KERN_INFO "microcode: CPU%d updated from revision "
-              "0x%x to 0x%x, date = %08x \n",
-              cpu_num, uci->rev, val[1], uci->mc.mc_intel->hdr.date);
+              "0x%x to 0x%x, date = %04x-%02x-%02x \n",
+               cpu_num, uci->rev, val[1],
+               uci->mc.mc_intel->hdr.date & 0xffff,
+               uci->mc.mc_intel->hdr.date >> 24,
+               (uci->mc.mc_intel->hdr.date >> 16) & 0xff);
        uci->rev = val[1];
 }