lkml.org 
[lkml]   [2003]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][2.5] add missing global_flush_tlb() after change_page_attr() calls
Date
After calling change_page_attr() global_flush_tlb() has to be called to 
kfree() some structures and make the changed page attributes visible by
flushing the relevant TLB entries.

This is not done in some places and this patch should fix it...

Thomas Schlichter

P.S.: I sent this patch on friday yet, but I think friday is a bad day for
sending patches... ;-)--- linux-2.5.62/arch/i386/mm/ioremap.c.orig Fri Feb 21 12:26:36 2003
+++ linux-2.5.62/arch/i386/mm/ioremap.c Fri Feb 21 12:28:44 2003
@@ -205,6 +205,7 @@
iounmap(p);
p = NULL;
}
+ global_flush_tlb();
}

return p;
@@ -226,6 +227,7 @@
change_page_attr(virt_to_page(__va(p->phys_addr)),
p->size >> PAGE_SHIFT,
PAGE_KERNEL);
+ global_flush_tlb();
}
kfree(p);
}
--- linux-2.5.62/arch/x86_64/mm/ioremap.c.orig Fri Feb 21 12:25:54 2003
+++ linux-2.5.62/arch/x86_64/mm/ioremap.c Fri Feb 21 12:27:58 2003
@@ -205,6 +205,7 @@
iounmap(p);
p = NULL;
}
+ global_flush_tlb();
}

return p;
@@ -226,6 +227,7 @@
change_page_attr(virt_to_page(__va(p->phys_addr)),
p->size >> PAGE_SHIFT,
PAGE_KERNEL);
+ global_flush_tlb();
}
kfree(p);
}
--- linux-2.5.62/arch/x86_64/kernel/pci-gart.c.orig Fri Feb 21 12:39:40 2003
+++ linux-2.5.62/arch/x86_64/kernel/pci-gart.c Fri Feb 21 12:43:13 2003
@@ -437,6 +437,7 @@
}
flush_gart();

+ global_flush_tlb();

printk("PCI-DMA: aperture base @ %x size %u KB\n", aper_base, aper_size>>10);
return 0;[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.035 / U:1.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site