diff options
author | Mark Langsdorf <mark.langsdorf@amd.com> | 2009-04-09 09:24:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-10 08:22:34 -0400 |
commit | ba518bea2db21c72d44a6cbfd825b026ef9cdcb6 (patch) | |
tree | 98891189633ecb48a0d0b1e6d995c3e808c827a3 /arch/x86/kernel/cpu/intel_cacheinfo.c | |
parent | f8b201fc7110c3673437254e8ba02451461ece0b (diff) |
x86: cacheinfo: disable L3 ECC scrubbing when L3 cache index is disabled
(Use correct mask to zero out bits 24-28 by Andreas)
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20090409132406.GK31527@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index fc28291e40ba..d46a849f44a8 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -731,6 +731,7 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf, | |||
731 | int node = cpu_to_node(cpu); | 731 | int node = cpu_to_node(cpu); |
732 | struct pci_dev *dev = node_to_k8_nb_misc(node); | 732 | struct pci_dev *dev = node_to_k8_nb_misc(node); |
733 | unsigned long val = 0; | 733 | unsigned long val = 0; |
734 | unsigned int scrubber = 0; | ||
734 | 735 | ||
735 | if (!this_leaf->can_disable) | 736 | if (!this_leaf->can_disable) |
736 | return -EINVAL; | 737 | return -EINVAL; |
@@ -745,6 +746,11 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf, | |||
745 | return -EINVAL; | 746 | return -EINVAL; |
746 | 747 | ||
747 | val |= 0xc0000000; | 748 | val |= 0xc0000000; |
749 | |||
750 | pci_read_config_dword(dev, 0x58, &scrubber); | ||
751 | scrubber &= ~0x1f000000; | ||
752 | pci_write_config_dword(dev, 0x58, scrubber); | ||
753 | |||
748 | pci_write_config_dword(dev, 0x1BC + index * 4, val & ~0x40000000); | 754 | pci_write_config_dword(dev, 0x1BC + index * 4, val & ~0x40000000); |
749 | wbinvd(); | 755 | wbinvd(); |
750 | pci_write_config_dword(dev, 0x1BC + index * 4, val); | 756 | pci_write_config_dword(dev, 0x1BC + index * 4, val); |