diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-07-01 14:42:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-02 05:10:07 -0400 |
commit | 50c31e4a2497ea17747b587e8f96b278f07f5483 (patch) | |
tree | 0f64d707dec7f84b7db607d201806ac7a133d0eb /arch/x86/kernel | |
parent | 192d8857427dd23707d5f0b86ca990c3af6f2d74 (diff) |
x86, mtrr: Use pci_dev->revision
This code uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so
it wasn't converted by commit 44c10138fd4 ("PCI: Change all
drivers to use pci_device->revision") before being moved to
arch/x86/...
Do it now at last -- and save one level of indentation...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/201107012242.08347.sshtylyov@ru.mvista.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 707b6377adf1..08119a37e53c 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -79,7 +79,6 @@ void set_mtrr_ops(const struct mtrr_ops *ops) | |||
79 | static int have_wrcomb(void) | 79 | static int have_wrcomb(void) |
80 | { | 80 | { |
81 | struct pci_dev *dev; | 81 | struct pci_dev *dev; |
82 | u8 rev; | ||
83 | 82 | ||
84 | dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL); | 83 | dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL); |
85 | if (dev != NULL) { | 84 | if (dev != NULL) { |
@@ -89,13 +88,11 @@ static int have_wrcomb(void) | |||
89 | * chipsets to be tagged | 88 | * chipsets to be tagged |
90 | */ | 89 | */ |
91 | if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS && | 90 | if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS && |
92 | dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) { | 91 | dev->device == PCI_DEVICE_ID_SERVERWORKS_LE && |
93 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); | 92 | dev->revision <= 5) { |
94 | if (rev <= 5) { | 93 | pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n"); |
95 | pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n"); | 94 | pci_dev_put(dev); |
96 | pci_dev_put(dev); | 95 | return 0; |
97 | return 0; | ||
98 | } | ||
99 | } | 96 | } |
100 | /* | 97 | /* |
101 | * Intel 450NX errata # 23. Non ascending cacheline evictions to | 98 | * Intel 450NX errata # 23. Non ascending cacheline evictions to |