aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-07-14 09:08:45 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:02 -0400
commit585583d95c5660973bc0cf64add517b040acd8a4 (patch)
tree4885b69235f5d34bd76260747dcf93f51a362b50 /include/asm-powerpc
parent7ff86b0317bc40c665aab62f3b7669713ade07c5 (diff)
powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
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>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index 11eede4a2906..73015f0139de 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -624,7 +624,7 @@ static inline unsigned long long pte_update(pte_t *p,
624 : "cc" ); 624 : "cc" );
625#else /* PTE_ATOMIC_UPDATES */ 625#else /* PTE_ATOMIC_UPDATES */
626 unsigned long long old = pte_val(*p); 626 unsigned long long old = pte_val(*p);
627 *p = __pte((old & ~clr) | set); 627 *p = __pte((old & ~(unsigned long long)clr) | set);
628#endif /* !PTE_ATOMIC_UPDATES */ 628#endif /* !PTE_ATOMIC_UPDATES */
629 629
630#ifdef CONFIG_44x 630#ifdef CONFIG_44x