x86/mce: don't spam the console with "CPUx: Temperature z"
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 16 Jun 2014 09:59:32 +0000 (11:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Jun 2014 09:59:32 +0000 (11:59 +0200)
commit323338f86fb6cd6f6dba4f59a84eed71b3552d21
tree9f5ece0783a5ea48549cb8d9911e636f29226fe6
parent775c681db114672088e506b52c851db7456913f2
x86/mce: don't spam the console with "CPUx: Temperature z"

If the machine has been quite busy it ends up with these messages
printed on the hypervisor console:

(XEN) CPU3: Temperature/speed normal
(XEN) CPU1: Temperature/speed normal
(XEN) CPU0: Temperature/speed normal
(XEN) CPU1: Temperature/speed normal
(XEN) CPU0: Temperature/speed normal
(XEN) CPU2: Temperature/speed normal
(XEN) CPU3: Temperature/speed normal
(XEN) CPU0: Temperature/speed normal
(XEN) CPU2: Temperature/speed normal
(XEN) CPU3: Temperature/speed normal
(XEN) CPU1: Temperature/speed normal
(XEN) CPU0: Temperature above threshold
(XEN) CPU0: Running in modulated clock mode
(XEN) CPU1: Temperature/speed normal
(XEN) CPU2: Temperature/speed normal
(XEN) CPU3: Temperature/speed normal

While the state changes are important, the non-altered state
information is not needed. As such add a latch mechanism to only print
the information if it has changed since the last update (and the
hardware doesn't properly suppress redundant notifications).

This was observed on Intel DQ67SW,
BIOS SWQ6710H.86A.0066.2012.1105.1504 11/05/2012

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Christoph Egger <chegger@amazon.de>
xen/arch/x86/cpu/mcheck/mce_intel.c