diff options
author | Arnd Bergmann <arnd.bergmann@de.ibm.com> | 2006-06-15 07:15:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-17 13:56:24 -0400 |
commit | 19242b240793ac769f5b91b68a5e43dd39f0c530 (patch) | |
tree | 76254ae73875cd581c9ba6d6d193c3446faa311a /arch/powerpc/mm | |
parent | f53ae1dc3429529a58aa538e0a860d713c7079c3 (diff) |
[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: 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>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 33654d1b1b43..994856e55b7c 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize) | |||
52 | default: | 52 | default: |
53 | penc = mmu_psize_defs[psize].penc; | 53 | penc = mmu_psize_defs[psize].penc; |
54 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | 54 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); |
55 | va |= (0x7f >> (8 - penc)) << 12; | 55 | va |= penc << 12; |
56 | asm volatile("tlbie %0,1" : : "r" (va) : "memory"); | 56 | asm volatile("tlbie %0,1" : : "r" (va) : "memory"); |
57 | break; | 57 | break; |
58 | } | 58 | } |
@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned long va, unsigned int psize) | |||
74 | default: | 74 | default: |
75 | penc = mmu_psize_defs[psize].penc; | 75 | penc = mmu_psize_defs[psize].penc; |
76 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | 76 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); |
77 | va |= (0x7f >> (8 - penc)) << 12; | 77 | va |= penc << 12; |
78 | asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" | 78 | asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" |
79 | : : "r"(va) : "memory"); | 79 | : : "r"(va) : "memory"); |
80 | break; | 80 | break; |