[PATCH] powerpc: Fix 64k pages on non-partitioned machines

STALE7372d

3 messages, 3 authors, 2006-06-16 · open the first message on its own page

[PATCH] powerpc: Fix 64k pages on non-partitioned machines

From: Paul Mackerras <hidden>
Date: 2006-06-15 11:15:44

From: Arnd Bergmann <redacted>

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 <redacted>
Signed-off-by: Paul Mackerras <redacted>
---
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;

Re: [PATCH] powerpc: Fix 64k pages on non-partitioned machines

From: Arnd Bergmann <hidden>
Date: 2006-06-15 13:10:00

On Thursday 15 June 2006 13:15, Paul Mackerras wrote:
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.
Actually, I thought we decided to postpone 64k page support on cell
to 2.6.18 already. This patch alone is not enough to make it work,
at least one more fix is needed for being able to boot, while
the spu file system needs major changes for it.

	Arnd <><

Re: [PATCH] powerpc: Fix 64k pages on non-partitioned machines

From: Anton Blanchard <hidden>
Date: 2006-06-16 00:14:16

Hi Arnd,
Actually, I thought we decided to postpone 64k page support on cell
to 2.6.18 already. This patch alone is not enough to make it work,
at least one more fix is needed for being able to boot, while
the spu file system needs major changes for it.
We are hitting the bug on other ppc64 systems too, so I think its worth
fixing for 2.6.17.

Anton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help