* [x86-64] Add missing tlb flush after change_page_attr
@ 2003-03-24 16:41 davej
2003-03-24 17:32 ` Andi Kleen
2003-03-24 20:08 ` [x86-64] Add missing tlb flush after change_page_attr Thomas Schlichter
0 siblings, 2 replies; 5+ messages in thread
From: davej @ 2003-03-24 16:41 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, ak
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/x86_64/kernel/pci-gart.c linux-2.5/arch/x86_64/kernel/pci-gart.c
--- bk-linus/arch/x86_64/kernel/pci-gart.c 2003-03-08 09:56:51.000000000 +0000
+++ linux-2.5/arch/x86_64/kernel/pci-gart.c 2003-03-18 21:19:53.000000000 +0000
@@ -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) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [x86-64] Add missing tlb flush after change_page_attr
2003-03-24 16:41 [x86-64] Add missing tlb flush after change_page_attr davej
@ 2003-03-24 17:32 ` Andi Kleen
2003-03-25 0:25 ` [PATCH][x86-64] make the pci aperture cachable Thomas Schlichter
2003-03-24 20:08 ` [x86-64] Add missing tlb flush after change_page_attr Thomas Schlichter
1 sibling, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2003-03-24 17:32 UTC (permalink / raw)
To: davej; +Cc: torvalds, linux-kernel
On Mon, 2003-03-24 at 17:41, davej@codemonkey.org.uk wrote:
> diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/x86_64/kernel/pci-gart.c linux-2.5/arch/x86_64/kernel/pci-gart.c
> --- bk-linus/arch/x86_64/kernel/pci-gart.c 2003-03-08 09:56:51.000000000 +0000
> +++ linux-2.5/arch/x86_64/kernel/pci-gart.c 2003-03-18 21:19:53.000000000 +0000
> @@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [x86-64] Add missing tlb flush after change_page_attr
2003-03-24 16:41 [x86-64] Add missing tlb flush after change_page_attr davej
2003-03-24 17:32 ` Andi Kleen
@ 2003-03-24 20:08 ` Thomas Schlichter
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Schlichter @ 2003-03-24 20:08 UTC (permalink / raw)
To: davej, torvalds; +Cc: linux-kernel, ak
Am Montag, 24. März 2003 17:41 schrieb davej@codemonkey.org.uk:
> diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/arch/x86_64/kernel/pci-gart.c
linux-2.5/arch/x86_64/kernel/pci-gart.c
> --- bk-linus/arch/x86_64/kernel/pci-gart.c 2003-03-08 09:56:51.000000000
+0000
> +++ linux-2.5/arch/x86_64/kernel/pci-gart.c 2003-03-18 21:19:53.000000000
+0000
> @@ -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) {
The global_flush_tlb() for the change_page_attr() is already present about 20
lines below...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH][x86-64] make the pci aperture cachable
2003-03-24 17:32 ` Andi Kleen
@ 2003-03-25 0:25 ` Thomas Schlichter
2003-03-25 1:46 ` Andi Kleen
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Schlichter @ 2003-03-25 0:25 UTC (permalink / raw)
To: Andi Kleen, davej; +Cc: torvalds, linux-kernel
[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 1054 bytes --]
Am Montag, 24. März 2003 18:32 schrieb Andi Kleen:
> On Mon, 2003-03-24 at 17:41, davej@codemonkey.org.uk wrote:
> > diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/arch/x86_64/kernel/pci-gart.c
linux-2.5/arch/x86_64/kernel/pci-gart.c
> > --- bk-linus/arch/x86_64/kernel/pci-gart.c 2003-03-08 09:56:51.000000000
+0000
> > +++ linux-2.5/arch/x86_64/kernel/pci-gart.c 2003-03-18 21:19:53.000000000
+0000
> > @@ -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
As this patch has been applied anyway here is a patch to make the pci aperture
cachable for 2.5.66.
Thomas Schlichter
[-- Attachment #1.2: pci-gart.patch --]
[-- Type: text/x-diff, Size: 592 bytes --]
--- linux-2.5.66/arch/x86_64/kernel/pci-gart.c.old Tue Mar 25 01:09:51 2003
+++ linux-2.5.66/arch/x86_64/kernel/pci-gart.c Tue Mar 25 01:16:28 2003
@@ -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;
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][x86-64] make the pci aperture cachable
2003-03-25 0:25 ` [PATCH][x86-64] make the pci aperture cachable Thomas Schlichter
@ 2003-03-25 1:46 ` Andi Kleen
0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2003-03-25 1:46 UTC (permalink / raw)
To: Thomas Schlichter; +Cc: Andi Kleen, davej, torvalds, linux-kernel
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-03-25 1:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-24 16:41 [x86-64] Add missing tlb flush after change_page_attr davej
2003-03-24 17:32 ` Andi Kleen
2003-03-25 0:25 ` [PATCH][x86-64] make the pci aperture cachable Thomas Schlichter
2003-03-25 1:46 ` Andi Kleen
2003-03-24 20:08 ` [x86-64] Add missing tlb flush after change_page_attr Thomas Schlichter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.