diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-14 17:30:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-14 17:30:20 -0500 |
commit | 184652eb6f68050af48a2ce3d5cf0537c208bee2 (patch) | |
tree | 1362a91c254120b68e324f58cc2715139bba53a5 /arch/x86/kernel/pci-gart_64.c | |
parent | 3223f59f9cd9d69a4344eeac8b16a262c5f373f1 (diff) |
x86: fix gart_iommu_init()
When the GART table is unmapped from the kernel direct mappings
during early bootup, make sure we have no leftover cachelines in it.
Note: the clflush done by set_memory_np() was not enough, because
clflush does not work on unmapped pages.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/pci-gart_64.c')
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 65f6acb025c8..faf3229f8fb3 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -749,6 +749,15 @@ void __init gart_iommu_init(void) | |||
749 | */ | 749 | */ |
750 | set_memory_np((unsigned long)__va(iommu_bus_base), | 750 | set_memory_np((unsigned long)__va(iommu_bus_base), |
751 | iommu_size >> PAGE_SHIFT); | 751 | iommu_size >> PAGE_SHIFT); |
752 | /* | ||
753 | * Tricky. The GART table remaps the physical memory range, | ||
754 | * so the CPU wont notice potential aliases and if the memory | ||
755 | * is remapped to UC later on, we might surprise the PCI devices | ||
756 | * with a stray writeout of a cacheline. So play it sure and | ||
757 | * do an explicit, full-scale wbinvd() _after_ having marked all | ||
758 | * the pages as Not-Present: | ||
759 | */ | ||
760 | wbinvd(); | ||
752 | 761 | ||
753 | /* | 762 | /* |
754 | * Try to workaround a bug (thanks to BenH) | 763 | * Try to workaround a bug (thanks to BenH) |