[PATCH] PPC64 Disable preemption in flush_tlb_pending

Paul Mackerras paulus at samba.org
Thu Jan 13 21:37:52 EST 2005


The preempt debug stuff found a place where we were using
smp_processor_id() without having preemption disabled, in
flush_tlb_pending.  This patch fixes it by using get_cpu_var and
put_cpu_var instead of the __get_cpu_var variant.

Signed-off-by: Paul Mackerras <paulus at samba.org>

diff -urN linux-2.5/include/asm-ppc64/tlbflush.h test/include/asm-ppc64/tlbflush.h
--- linux-2.5/include/asm-ppc64/tlbflush.h	2004-06-07 08:25:32.000000000 +1000
+++ test/include/asm-ppc64/tlbflush.h	2005-01-13 19:35:37.000000000 +1100
@@ -32,10 +32,11 @@
 
 static inline void flush_tlb_pending(void)
 {
-	struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
+	struct ppc64_tlb_batch *batch = &get_cpu_var(ppc64_tlb_batch);
 
 	if (batch->index)
 		__flush_tlb_pending(batch);
+	put_cpu_var(ppc64_tlb_batch);
 }
 
 #define flush_tlb_mm(mm)			flush_tlb_pending()



More information about the Linuxppc64-dev mailing list