aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/pci-gart.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-rw-r--r--arch/x86_64/kernel/pci-gart.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 0c3f052ba6ce..a6c01e121266 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -65,9 +65,7 @@ static u32 gart_unmapped_entry;
65 65
66#define for_all_nb(dev) \ 66#define for_all_nb(dev) \
67 dev = NULL; \ 67 dev = NULL; \
68 while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\ 68 while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)
69 if (dev->bus->number == 0 && \
70 (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))
71 69
72static struct pci_dev *northbridges[MAX_NB]; 70static struct pci_dev *northbridges[MAX_NB];
73static u32 northbridge_flush_word[MAX_NB]; 71static u32 northbridge_flush_word[MAX_NB];
@@ -148,9 +146,12 @@ static void flush_gart(struct device *dev)
148 if (!northbridges[i]) 146 if (!northbridges[i])
149 continue; 147 continue;
150 /* Make sure the hardware actually executed the flush. */ 148 /* Make sure the hardware actually executed the flush. */
151 do { 149 for (;;) {
152 pci_read_config_dword(northbridges[i], 0x9c, &w); 150 pci_read_config_dword(northbridges[i], 0x9c, &w);
153 } while (w & 1); 151 if (!(w & 1))
152 break;
153 cpu_relax();
154 }
154 } 155 }
155 if (!flushed) 156 if (!flushed)
156 printk("nothing to flush?\n"); 157 printk("nothing to flush?\n");