linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix 64k pages on non-partitioned machines
@ 2006-06-15 11:15 Paul Mackerras
  2006-06-15 13:08 ` Arnd Bergmann
       [not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Mackerras @ 2006-06-15 11:15 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev

From: Arnd Bergmann <arnd.bergmann@de.ibm.com>

The page size encoding passed to tlbie is incorrect for new-style
large pages.  This fixes it.  This doesn't affect anything on older
machines because mmu_psize_defs[psize].penc (the page size encoding)
is 0 for 4k and 16M pages (the two are distinguished by a separate "is
a large page" bit).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
Linus, without this patch, we can't use 64k pages on Cell systems.  If
you could apply this before 2.6.17 is released, that would be good.
If not, I'll send it in post 2.6.17.

Paul.

Index: linus-2.6/arch/powerpc/mm/hash_native_64.c
===================================================================
--- linus-2.6.orig/arch/powerpc/mm/hash_native_64.c
+++ linus-2.6/arch/powerpc/mm/hash_native_64.c
@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long
 	default:
 		penc = mmu_psize_defs[psize].penc;
 		va &= ~((1ul << mmu_psize_defs[psize].shift) - 1);
-		va |= (0x7f >> (8 - penc)) << 12;
+		va |= penc << 12;
 		asm volatile("tlbie %0,1" : : "r" (va) : "memory");
 		break;
 	}
@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned lon
 	default:
 		penc = mmu_psize_defs[psize].penc;
 		va &= ~((1ul << mmu_psize_defs[psize].shift) - 1);
-		va |= (0x7f >> (8 - penc)) << 12;
+		va |= penc << 12;
 		asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)"
 			     : : "r"(va) : "memory");
 		break;

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

end of thread, other threads:[~2006-06-16  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 11:15 [PATCH] powerpc: Fix 64k pages on non-partitioned machines Paul Mackerras
2006-06-15 13:08 ` Arnd Bergmann
2006-06-16  0:14   ` Anton Blanchard
     [not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
2006-06-15 13:09   ` [PATCH] powerpc: enable CPU_FTR_CI_LARGE_PAGE for cell Arnd Bergmann

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