mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][2.5] add missing global_flush_tlb() after change_page_attr() calls
@ 2003-02-26 11:17 Thomas Schlichter
  2003-02-26 11:27 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schlichter @ 2003-02-26 11:17 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Linux Kernel


[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 376 bytes --]

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... ;-)

[-- Attachment #1.2: missing_global_flush_tlb.patch --]
[-- Type: text/x-diff, Size: 1184 bytes --]

--- 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;

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-26 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 11:17 [PATCH][2.5] add missing global_flush_tlb() after change_page_attr() calls Thomas Schlichter
2003-02-26 11:27 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®