* [PATCH] powerpc: Fix 64k pages on non-partitioned machines
@ 2006-06-15 11:15 Paul Mackerras
2006-06-15 13:08 ` Arnd Bergmann
[not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
0 siblings, 2 replies; 4+ messages in thread
From: Paul Mackerras @ 2006-06-15 11:15 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
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>
---
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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Fix 64k pages on non-partitioned machines
2006-06-15 11:15 [PATCH] powerpc: Fix 64k pages on non-partitioned machines Paul Mackerras
@ 2006-06-15 13:08 ` Arnd Bergmann
2006-06-16 0:14 ` Anton Blanchard
[not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2006-06-15 13:08 UTC (permalink / raw)
To: linuxppc-dev; +Cc: torvalds, Paul Mackerras
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 <><
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] powerpc: enable CPU_FTR_CI_LARGE_PAGE for cell
[not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
@ 2006-06-15 13:09 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2006-06-15 13:09 UTC (permalink / raw)
To: linuxppc-dev; +Cc: torvalds, Paul Mackerras
Reflect the fact that the Cell Broadband Engine supports 64k
pages by adding the bit to the CPU features.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
Index: linus-2.6/include/asm-powerpc/cputable.h
===================================================================
--- linus-2.6.orig/include/asm-powerpc/cputable.h
+++ linus-2.6/include/asm-powerpc/cputable.h
@@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Fix 64k pages on non-partitioned machines
2006-06-15 13:08 ` Arnd Bergmann
@ 2006-06-16 0:14 ` Anton Blanchard
0 siblings, 0 replies; 4+ messages in thread
From: Anton Blanchard @ 2006-06-16 0:14 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, torvalds, Paul Mackerras
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-16 0:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 11:15 [PATCH] powerpc: Fix 64k pages on non-partitioned machines Paul Mackerras
2006-06-15 13:08 ` Arnd Bergmann
2006-06-16 0:14 ` Anton Blanchard
[not found] ` <200606151503.11198.arnd.bergmann@de.ibm.com>
2006-06-15 13:09 ` [PATCH] powerpc: enable CPU_FTR_CI_LARGE_PAGE for cell Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).