diff options
author | Borislav Petkov <bp@suse.de> | 2013-03-20 14:07:27 (GMT) |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-04-02 17:12:54 (GMT) |
commit | e6ee94d58dfd06ec64c55f91581f00d4f98bf1f6 (patch) | |
tree | 81bfb5b71e3d579675c5490be0f77f405995a9d4 /arch/x86/kernel | |
parent | c5b41a67505cc3c9744d8f105c63a3bf3c443a01 (diff) | |
download | linux-fsl-qoriq-e6ee94d58dfd06ec64c55f91581f00d4f98bf1f6.tar.xz |
x86, cpu: Convert AMD Erratum 383
Convert the AMD erratum 383 testing code to the bug infrastructure. This
allows keeping the AMD-specific erratum testing machinery private to
amd.c and not export symbols to modules needlessly.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1363788448-31325-6-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index fa96eb0..85f84e1 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -513,6 +513,8 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) #endif } +static const int amd_erratum_383[]; + static void __cpuinit init_amd(struct cpuinfo_x86 *c) { u32 dummy; @@ -727,6 +729,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) rdmsrl_safe(MSR_AMD64_BU_CFG2, &value); value &= ~(1ULL << 24); wrmsrl_safe(MSR_AMD64_BU_CFG2, value); + + if (cpu_has_amd_erratum(amd_erratum_383)) + set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH); } rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); @@ -863,9 +868,8 @@ const int amd_erratum_400[] = AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)); EXPORT_SYMBOL_GPL(amd_erratum_400); -const int amd_erratum_383[] = +static const int amd_erratum_383[] = AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf)); -EXPORT_SYMBOL_GPL(amd_erratum_383); bool cpu_has_amd_erratum(const int *erratum) { |