]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
authorKumar Gala <galak@kernel.crashing.org>
Mon, 14 Jul 2008 13:08:45 +0000 (08:08 -0500)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 15 Jul 2008 05:44:02 +0000 (15:44 +1000)
Because the pte is now 64-bits the compiler was optimizing the update
to always clear the upper 32-bits of the pte.  We need to ensure the
clr mask is treated as an unsigned long long to get the proper behavior.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
include/asm-powerpc/pgtable-ppc32.h

index 11eede4a2906d43f8a46105d41106dc8bd2c13f6..73015f0139deeb94c0a81adf6b7e5007049666a3 100644 (file)
@@ -624,7 +624,7 @@ static inline unsigned long long pte_update(pte_t *p,
        : "cc" );
 #else /* PTE_ATOMIC_UPDATES */
        unsigned long long old = pte_val(*p);
-       *p = __pte((old & ~clr) | set);
+       *p = __pte((old & ~(unsigned long long)clr) | set);
 #endif /* !PTE_ATOMIC_UPDATES */
 
 #ifdef CONFIG_44x