x86, amd: Restrict usage of c1e_idle()
commitb89725179b5fc5ea585930420c7df568de0a97be
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Fri, 19 Mar 2010 11:09:22 +0000 (19 12:09 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:54 +0000 (1 16:01 -0700)
tree153f64f908780ef295b24c06bc697c19103b0ce9
parent9fcb3fd97bccf736945cccdd74005d64be9602e1
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