aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Deguara <joachim.deguara@amd.com>2007-04-24 07:05:36 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-04-24 07:05:36 -0400
commitcf6387daf8858bdcb3e123034ca422e8979d73f1 (patch)
tree3b3d83f375539fa17b65ef659245b24e6c0eae3e
parentc445a31cd7f469d77acc37538ab43a99530968b8 (diff)
[PATCH] x86-64: make GART PTEs uncacheable
This patches fixes the silent data corruption problems being seen using the GART iommu where 4kB of data where incorrect (seen mostly on Nvidia CK804 systems). This fix, to mark the memory regin the GART PTEs reside on as uncacheable, also brings the code in line with the AGP specification. Signed-off-by: Joachim Deguara <joachim.deguara@amd.com> Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/x86_64/kernel/pci-gart.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 2bac8c60ad61..0bae862e9a55 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -519,7 +519,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
519 gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32); 519 gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32);
520 gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 520 gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size));
521 if (!gatt) 521 if (!gatt)
522 panic("Cannot allocate GATT table"); 522 panic("Cannot allocate GATT table");
523 if (change_page_attr_addr((unsigned long)gatt, gatt_size >> PAGE_SHIFT, PAGE_KERNEL_NOCACHE))
524 panic("Could not set GART PTEs to uncacheable pages");
525 global_flush_tlb();
526
523 memset(gatt, 0, gatt_size); 527 memset(gatt, 0, gatt_size);
524 agp_gatt_table = gatt; 528 agp_gatt_table = gatt;
525 529