Commit 19242b24 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds

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

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f53ae1dc
...@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize) ...@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize)
default: default:
penc = mmu_psize_defs[psize].penc; penc = mmu_psize_defs[psize].penc;
va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); va &= ~((1ul << mmu_psize_defs[psize].shift) - 1);
va |= (0x7f >> (8 - penc)) << 12; va |= penc << 12;
asm volatile("tlbie %0,1" : : "r" (va) : "memory"); asm volatile("tlbie %0,1" : : "r" (va) : "memory");
break; break;
} }
...@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned long va, unsigned int psize) ...@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned long va, unsigned int psize)
default: default:
penc = mmu_psize_defs[psize].penc; penc = mmu_psize_defs[psize].penc;
va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); va &= ~((1ul << mmu_psize_defs[psize].shift) - 1);
va |= (0x7f >> (8 - penc)) << 12; va |= penc << 12;
asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)"
: : "r"(va) : "memory"); : : "r"(va) : "memory");
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment