]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86, amd: Restrict usage of c1e_idle()
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Fri, 19 Mar 2010 11:09:22 +0000 (12:09 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:58:48 +0000 (15:58 -0700)
commit341badb52110ba8fff671b3078da7ff45440fc4c
tree8a5795285c811e517e6d5ec3e5a209d635098f7a
parent566c0284389aa5d097356ae016cf04d3aa837195
x86, amd: Restrict usage of c1e_idle()

commit 035a02c1e1de31888e8b6adac0ff667971ac04db upstream.

Currently c1e_idle returns true for all CPUs greater than or equal to
family 0xf model 0x40. This covers too many CPUs.

Meanwhile a respective erratum for the underlying problem was filed
(#400). This patch adds the logic to check whether erratum #400
applies to a given CPU.
Especially for CPUs where SMI/HW triggered C1e is not supported,
c1e_idle() doesn't need to be used. We can check this by looking at
the respective OSVW bit for erratum #400.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100319110922.GA19614@alberich.amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/include/asm/msr-index.h
arch/x86/kernel/process.c