]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: Fix 64k pages on non-partitioned machines
authorArnd Bergmann <arnd.bergmann@de.ibm.com>
Thu, 15 Jun 2006 11:15:44 +0000 (21:15 +1000)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 17 Jun 2006 17:56:24 +0000 (10:56 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/powerpc/mm/hash_native_64.c

index 33654d1b1b43b596ac70e98cf834a1185157f355..994856e55b7c49f79f008936c249b2ac897ce9f5 100644 (file)
@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize)
        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 long va, unsigned int psize)
        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;