Add missing tlb flush after change_page_attr
arch/x86_64/kernel/pci-gart.c +1 -0
@@ -419,6 +419,7 @@ static __init int init_k8_gatt(agp_kern_panic ("Cannot allocate GATT table" );memset (gatt,0 , gatt_size);change_page_attr (virt_to_page (gatt), gatt_size/PAGE_SIZE ,PAGE_KERNEL_NOCACHE ); +global_flush_tlb (); agp_gatt_table = gatt;for_all_nb (dev) {
arch/x86_64/kernel/pci-gart.c static __init int init_k8_gatt(agp_kern_ · line 425
Quoted 11 lines · On Mon, 2003-03-24 at 17:41, [email protected] wrote:
diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/arch/x86_64/kernel/pci-gart.clinux-2.5/arch/x86_64/kernel/pci-gart.carch/x86_64/kernel/pci-gart.c +1
-0@@ -419,6 +419,7 @@ static __init int init_k8_gatt(agp_kern_panic ("Cannot allocate GATT table" );memset (gatt,0 , gatt_size);change_page_attr (virt_to_page (gatt), gatt_size/PAGE_SIZE ,PAGE_KERNEL_NOCACHE ); +global_flush_tlb (); agp_gatt_table = gatt;for_all_nb (dev) {
No it needs to be completely removed. the pci aperture is supposed to be cachable (unlike the AGP aperture) That's still a trace of an earlier design.
-Andi
PATCH 1/1 make the pci aperture cachable
Am Montag, 24. März 2003 18:32 schrieb Andi Kleen:
Quoted 2 lines · On Mon, 2003-03-24 at 17:41, [email protected] wrote:
Quoted 1 line
diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/arch/x86_64/kernel/pci-gart.clinux-2.5/arch/x86_64/kernel/pci-gart.c
Quoted 1 line
Quoted 1 line
---
bk-linus/arch/x86_64/kernel/pci-gart.c2003-03-08 09:56:51.000000000
+0000
Quoted 1 line
Quoted 1 line
+++
linux-2.5/arch/x86_64/kernel/pci-gart.c2003-03-18 21:19:53.000000000
+0000
Quoted 4 lines
Review static __init int init_k8_gatt(agp_kern_ · line 421
Quoted 4 lines
(quoted diff) +0
-0@@ -419,6 +419,7 @@ static __init int init_k8_gatt(agp_kern_ panic("Cannot allocate GATT table"); memset(gatt, 0, gatt_size); change_page_attr(virt_to_page(gatt), gatt_size/PAGE_SIZE,
PAGE_KERNEL_NOCACHE);
Quoted 10 lines
Review static __init int init_k8_gatt(agp_kern_ · line 425
Quoted 4 lines
(quoted diff) +1
-0+ global_flush_tlb(); agp_gatt_table = gatt; for_all_nb(dev) {No it needs to be completely removed. the pci aperture is supposed to be cachable (unlike the AGP aperture) That's still a trace of an earlier design.
-Andi
As this patch has been applied anyway here is a patch to make the pci aperture cachable for 2.5.66.
Thomas Schlichter
arch/x86_64/kernel/pci-gart.c renamed from arch/x86_64/kernel/pci-gart.c.old +0 -4
@@ -418,8 +418,6 @@if (!gatt)panic ("Cannot allocate GATT table" );memset (gatt,0 , gatt_size); -change_page_attr (virt_to_page (gatt), gatt_size/PAGE_SIZE ,PAGE_KERNEL_NOCACHE ); -global_flush_tlb (); agp_gatt_table = gatt;for_all_nb (dev) {
@@ -438,8 +436,6 @@ }flush_gart (); -global_flush_tlb (); -printk ("PCI-DMA: aperture base @ %x size %u KB\n" , aper_base, aper_size>>10 );return 0 ;
Re: [PATCH][x86-64] make the pci aperture cachable
Quoted 2 lines
As this patch has been applied anyway here is a patch to make the pci aperture cachable for 2.5.66.
It actually needs a different change. This is just the fallback path when your BIOS didn't set up an aperture (no AGP port). In case of an existing aperture it needs to remap the IOMMU half.
I fixed it now in my tree.
-Andi
Am Montag, 24. März 2003 17:41 schrieb [email protected]:
Quoted 1 line
diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/arch/x86_64/kernel/pci-gart.clinux-2.5/arch/x86_64/kernel/pci-gart.c
Quoted 1 line
---
bk-linus/arch/x86_64/kernel/pci-gart.c2003-03-08 09:56:51.000000000
+0000
Quoted 1 line
+++
linux-2.5/arch/x86_64/kernel/pci-gart.c2003-03-18 21:19:53.000000000
+0000
arch/x86_64/kernel/pci-gart.c static __init int init_k8_gatt(agp_kern_ · line 421
Quoted 4 lines
arch/x86_64/kernel/pci-gart.c +0
-0@@ -419,6 +419,7 @@ static __init int init_k8_gatt(agp_kern_panic ("Cannot allocate GATT table" );memset (gatt,0 , gatt_size); change_page_attr(virt_to_page(gatt), gatt_size/PAGE_SIZE,
PAGE_KERNEL_NOCACHE);
arch/x86_64/kernel/pci-gart.c static __init int init_k8_gatt(agp_kern_ · line 425
Quoted 4 lines
arch/x86_64/kernel/pci-gart.c +1
-0+global_flush_tlb (); agp_gatt_table = gatt;for_all_nb (dev) {
The global_flush_tlb() for the change_page_attr() is already present about 20 lines below...