]> bbs.cooldavid.org Git - net-next-2.6.git/commit
x86, cacheinfo: Enable L3 CID only on AMD
authorBorislav Petkov <borislav.petkov@amd.com>
Thu, 18 Feb 2010 18:37:14 +0000 (19:37 +0100)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 19 Feb 2010 05:59:07 +0000 (21:59 -0800)
commitcb19060abfdecac0d1eb2d2f0e7d6b7a3f8bc4f4
tree994491932034c4b6be2a1c08d4098899c80aff8e
parentf619b3d8427eb57f0134dab75b0d217325c72411
x86, cacheinfo: Enable L3 CID only on AMD

Final stage linking can fail with

 arch/x86/built-in.o: In function `store_cache_disable':
 intel_cacheinfo.c:(.text+0xc509): undefined reference to `amd_get_nb_id'
 arch/x86/built-in.o: In function `show_cache_disable':
 intel_cacheinfo.c:(.text+0xc7d3): undefined reference to `amd_get_nb_id'

when CONFIG_CPU_SUP_AMD is not enabled because the amd_get_nb_id
helper is defined in AMD-specific code but also used in generic code
(intel_cacheinfo.c). Reorganize the L3 cache index disable code under
CONFIG_CPU_SUP_AMD since it is AMD-only anyway.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100218184210.GF20473@aftab>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/cpu/intel_cacheinfo.c