linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
@ 2008-07-14 13:08 Kumar Gala
  2008-07-14 13:09 ` [PATCH 2/3] powerpc: rework FSL Book-E PTE access and TLB miss Kumar Gala
  2008-07-15  5:43 ` [PATCH 1/3] powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES Benjamin Herrenschmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Kumar Gala @ 2008-07-14 13:08 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 include/asm-powerpc/pgtable-ppc32.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index 11eede4..73015f0 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,
 	: "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
-- 
1.5.5.1

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

end of thread, other threads:[~2008-07-15  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 13:08 [PATCH 1/3] powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES Kumar Gala
2008-07-14 13:09 ` [PATCH 2/3] powerpc: rework FSL Book-E PTE access and TLB miss Kumar Gala
2008-07-14 13:11   ` [PATCH 3/3] powerpc/fsl: Minor TLBSYNC cleanup for FSL Book-E Kumar Gala
2008-07-15  5:43 ` [PATCH 1/3] powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).