Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf6387da authored by Joachim Deguara's avatar Joachim Deguara Committed by Andi Kleen
Browse files

[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: default avatarJoachim Deguara <joachim.deguara@amd.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent c445a31c
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -520,6 +520,10 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
	gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 
	gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 
	if (!gatt) 
	if (!gatt) 
		panic("Cannot allocate GATT table");
		panic("Cannot allocate GATT table");
	if (change_page_attr_addr((unsigned long)gatt, gatt_size >> PAGE_SHIFT, PAGE_KERNEL_NOCACHE))
		panic("Could not set GART PTEs to uncacheable pages");
	global_flush_tlb();

	memset(gatt, 0, gatt_size); 
	memset(gatt, 0, gatt_size); 
	agp_gatt_table = gatt;
	agp_gatt_table = gatt;