x86: fix gart_iommu_init()
[sfrench/cifs-2.6.git] / arch / x86 / kernel / pci-gart_64.c
index 65f6acb025c8833dc8183991bb313e52e3cff9ec..faf3229f8fb35feed3dd8ee31d521c33086dc621 100644 (file)
@@ -749,6 +749,15 @@ void __init gart_iommu_init(void)
         */
        set_memory_np((unsigned long)__va(iommu_bus_base),
                                iommu_size >> PAGE_SHIFT);
+       /*
+        * Tricky. The GART table remaps the physical memory range,
+        * so the CPU wont notice potential aliases and if the memory
+        * is remapped to UC later on, we might surprise the PCI devices
+        * with a stray writeout of a cacheline. So play it sure and
+        * do an explicit, full-scale wbinvd() _after_ having marked all
+        * the pages as Not-Present:
+        */
+       wbinvd();
 
        /*
         * Try to workaround a bug (thanks to BenH)