powerpc: Fix 64k pages on non-partitioned machines
PATCH 1/1 powerpc: Fix 64k pages on non-partitioned machines
From: Arnd Bergmann <[email protected]>
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).
---
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.
arch/powerpc/mm/hash_native_64.c +2 -2
@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned longdefault : penc = mmu_psize_defs[psize].penc; va &= ~((1ul << mmu_psize_defs[psize].shift) -1 ); - va |= (0x7f >> (8 - penc)) <<12 ; + va |= penc <<12 ; asmvolatile ("tlbie %0,1" : :"r" (va) :"memory" );break ; }
@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned londefault : penc = mmu_psize_defs[psize].penc; va &= ~((1ul << mmu_psize_defs[psize].shift) -1 ); - va |= (0x7f >> (8 - penc)) <<12 ; + va |= penc <<12 ; asmvolatile (".long 0x7c000224 | (%0 << 11) | (1 << 21)" : :"r" (va) :"memory" );break ;
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 powerpc: enable CPU_FTR_CI_LARGE_PAGE for cell
Reflect the fact that the Cell Broadband Engine supports 64k pages by adding the bit to the CPU features.
---
include/asm-powerpc/cputable.h +1 -1
@@ -329,7 +329,7 @@ extern void do_cpu_ftr_fixups(unsigned l#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ - CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO) + CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE)#define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2)#endif
Quoted 3 lines · Paul Mackerras
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 <><
Hi Arnd,
Quoted 4 lines
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