Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Enable write combining for server works LE rev > 6

Enable write combining for server works LE rev > 6 per
http://www.ussg.iu.edu/hypermail/linux/kernel/0104.3/1007.html

Signed-Off-By: Lee Revell <rlrevell@joe-job.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Lee Revell and committed by
Linus Torvalds
a6954ba2 48c88211

+9 -5
+9 -5
arch/i386/kernel/cpu/mtrr/main.c
··· 72 72 static int have_wrcomb(void) 73 73 { 74 74 struct pci_dev *dev; 75 + u8 rev; 75 76 76 77 if ((dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) { 77 - /* ServerWorks LE chipsets have problems with write-combining 78 + /* ServerWorks LE chipsets < rev 6 have problems with write-combining 78 79 Don't allow it and leave room for other chipsets to be tagged */ 79 80 if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS && 80 81 dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) { 81 - printk(KERN_INFO "mtrr: Serverworks LE detected. Write-combining disabled.\n"); 82 - pci_dev_put(dev); 83 - return 0; 82 + pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); 83 + if (rev <= 5) { 84 + printk(KERN_INFO "mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n"); 85 + pci_dev_put(dev); 86 + return 0; 87 + } 84 88 } 85 - /* Intel 450NX errata # 23. Non ascending cachline evictions to 89 + /* Intel 450NX errata # 23. Non ascending cacheline evictions to 86 90 write combining memory may resulting in data corruption */ 87 91 if (dev->vendor == PCI_VENDOR_ID_INTEL && 88 92 dev->device == PCI_DEVICE_ID_INTEL_82451NX) {