public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c with flush_tlb_all()
@ 2003-02-20 20:00 Thomas Schlichter
  2003-02-20 20:20 ` Andrew Morton
  2003-02-20 20:36 ` Dave Jones
  0 siblings, 2 replies; 15+ messages in thread
From: Thomas Schlichter @ 2003-02-20 20:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel


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

This patch replaces the flush_map() function in the arch/i386/mm/pageattr.c file with flush_tlb_all() calls, as the flush_map() function wants to do the same, but just forgot the preempt_disable() and preempt_enable() calls.

To minimize future inconsistency I think this patch should be applied...

Best regards
  Thomas Schlichter

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

--- linux-2.5.62/arch/i386/mm/pageattr.c.orig	Wed Feb 19 16:44:56 2003
+++ linux-2.5.62/arch/i386/mm/pageattr.c	Wed Feb 19 16:46:11 2003
@@ -45,17 +45,6 @@
 	return base;
 } 
 
-static void flush_kernel_map(void *dummy) 
-{ 
-	/* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */
-	if (boot_cpu_data.x86_model >= 4) 
-		asm volatile("wbinvd":::"memory"); 
-	/* Flush all to work around Errata in early athlons regarding 
-	 * large page flushing. 
-	 */
-	__flush_tlb_all(); 	
-}
-
 static void set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) 
 { 
 	set_pte_atomic(kpte, pte); 	/* change init_mm */
@@ -129,14 +118,6 @@
 	return 0;
 } 
 
-static inline void flush_map(void)
-{	
-#ifdef CONFIG_SMP 
-	smp_call_function(flush_kernel_map, NULL, 1, 1);
-#endif	
-	flush_kernel_map(NULL);
-}
-
 struct deferred_page { 
 	struct deferred_page *next; 
 	struct page *fpage;
@@ -172,7 +153,7 @@
 			struct deferred_page *df;
 			df = kmalloc(sizeof(struct deferred_page), GFP_KERNEL); 
 			if (!df) {
-				flush_map();
+				flush_tlb_all();
 				__free_page(fpage);
 			} else { 
 				df->next = df_list;
@@ -192,7 +173,7 @@
 	down_read(&init_mm.mmap_sem);
 	df = xchg(&df_list, NULL);
 	up_read(&init_mm.mmap_sem);
-	flush_map();
+	flush_tlb_all();
 	for (; df; df = next_df) { 
 		next_df = df->next;
 		if (df->fpage) 

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

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

end of thread, other threads:[~2003-02-22  3:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-20 20:00 [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c with flush_tlb_all() Thomas Schlichter
2003-02-20 20:20 ` Andrew Morton
2003-02-20 20:36 ` Dave Jones
2003-02-20 20:30   ` Thomas Schlichter
2003-02-20 20:50     ` Dave Jones
2003-02-21 11:24       ` Thomas Schlichter
2003-02-21 12:19         ` [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all() Hugh Dickins
2003-02-21 12:42           ` Thomas Schlichter
2003-02-21 14:20             ` Dave Jones
2003-02-21 14:25               ` Thomas Schlichter
2003-02-21 15:01                 ` Dave Jones
2003-02-21 14:52               ` Hugh Dickins
2003-02-21 15:10                 ` Dave Jones
2003-02-21 17:36               ` Dave Jones
2003-02-22  3:23                 ` [PATCH][2.5] fix preempt-issues with smp_call_function() Thomas Schlichter

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