public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] I386 convert pae wmb to non smp
@ 2006-04-26 22:03 Zachary Amsden
  2006-04-27  0:00 ` Nick Piggin
  0 siblings, 1 reply; 5+ messages in thread
From: Zachary Amsden @ 2006-04-26 22:03 UTC (permalink / raw)
  To: Andrew Morton, Linux-Kernel, Hugh Dickins, Jan Beulich,
	Keir Fraser, Pratap Subrahmanyam, Nick Piggin, Zachary Amsden

Similar to the last bug, on set_pte, we don't want the compiler to re-order
the write of the PTE, even in non-SMP configurations, since if the write of
the low word occurs first, the TLB could prefetch a bad highmem mapping which
has been aliased into low memory.

Signed-off-by: Zachary Amsden <zach@vmware.com>

Index: linux-2.6.17-rc/include/asm-i386/pgtable-3level.h
===================================================================
--- linux-2.6.17-rc.orig/include/asm-i386/pgtable-3level.h	2006-04-26 08:38:57.000000000 -0700
+++ linux-2.6.17-rc/include/asm-i386/pgtable-3level.h	2006-04-26 14:45:12.000000000 -0700
@@ -53,7 +53,7 @@ static inline int pte_exec_kernel(pte_t 
 static inline void set_pte(pte_t *ptep, pte_t pte)
 {
 	ptep->pte_high = pte.pte_high;
-	smp_wmb();
+	wmb();
 	ptep->pte_low = pte.pte_low;
 }
 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)

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

end of thread, other threads:[~2006-04-27  8:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26 22:03 [PATCH 2/2] I386 convert pae wmb to non smp Zachary Amsden
2006-04-27  0:00 ` Nick Piggin
2006-04-27  1:09   ` Zachary Amsden
2006-04-27  3:30     ` Nick Piggin
2006-04-27  8:21       ` Keir Fraser

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