mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix date output in x86 microcode driver.
@ 2008-08-12 12:25 David Woodhouse
  2008-08-13 16:56 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: David Woodhouse @ 2008-08-12 12:25 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-kernel

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>

diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 652fa5c..394fbdd 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -343,8 +343,9 @@ 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->hdr.date);
+	       "0x%x to 0x%x, date = %04x-%02x-%02x \n",
+	       cpu_num, uci->rev, val[1], uci->mc->hdr.date & 0xffff,
+	       uci->mc->hdr.date >> 24, (uci->mc->hdr.date >> 16) & 0xff);
 	uci->rev = val[1];
 }
 

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-13 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12 12:25 [PATCH] Fix date output in x86 microcode driver David Woodhouse
2008-08-13 16:56 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®