lkml.org 
[lkml]   [2006]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] I386 convert pae wmb to non smp
Zachary Amsden wrote:

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

wmb() means that it also orders IO memory. It is no difference for
i386, but smp_wmb() actually has the right semantics of the abstract
Linux memory model.

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

Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-27 02:50    [W:0.254 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site