[patch 0/8] spufs release for 2.6.13
Arnd Bergmann
arnd at arndb.de
Mon Oct 17 09:50:47 EST 2005
On Freedag 30 September 2005 00:00, Arnd Bergmann wrote:
> This is the current patch set that we have been testing on the Cell
> Blade with the 2.6.13 kernel. Parts of this have already been included
> in 2.6.14-rc or are superceded by recent developments that I have
> already posted for -rc2.
>
> The patch set is not meant for review or for even inclusion in a
> mainline kernel but rather as a reference of what we are running
> ourselves. It also provides a base level for our friends at
> http://www.bsc.es/projects/deepcomputing/linuxoncell/ so they
> can build a distribution kernel from it.
Here is a small update for that fixes a few problems with memory
management on the 2.6.13 spufs tree:
- Do global TLB flush all the time for now.
- Enable the use of hugetlb mappings.
- Use all eight slb entries instead of only one.
- Shut up the debugging output.
Everybody using the previous patch set should also apply this patch.
---
--- linux-2.6.13.orig/include/asm-ppc64/cputable.h
+++ linux-2.6.13/include/asm-ppc64/cputable.h
@@ -148,7 +148,7 @@
PPC_FEATURE_HAS_FPU | PPC_FEATURE_HAS_MMU)
#define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \
- CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \
+ CPU_FTR_NOEXECUTE | \
CPU_FTR_NODSISRALIGN | CPU_FTR_CTRL)
/* iSeries doesn't support large pages */
Index: linux-2.6.13/arch/ppc64/kernel/spu_base.c
===================================================================
--- linux-2.6.13.orig/arch/ppc64/kernel/spu_base.c
+++ linux-2.6.13/arch/ppc64/kernel/spu_base.c
@@ -20,7 +20,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#define DEBUG 1
+#undef DEBUG
#include <linux/interrupt.h>
#include <linux/list.h>
@@ -72,6 +72,7 @@ int spu_handle_data_seg(struct spu *spu)
struct spu_priv2 __iomem *priv2;
struct mm_struct *mm;
unsigned long ea;
+ u64 esid, vsid;
pr_debug("%s\n", __FUNCTION__);
@@ -92,14 +93,18 @@ int spu_handle_data_seg(struct spu *spu)
mm = current->mm;
- if (spu->slb_replace >= 8)
- spu->slb_replace = 0;
+ esid = (ea & ESID_MASK) | SLB_ESID_V;
+ vsid = (get_vsid(mm->context.id, ea) << SLB_VSID_SHIFT) | SLB_VSID_USER;
+ if (in_hugepage_area(mm->context, ea))
+ vsid |= SLB_VSID_L;
out_be64(&priv2->slb_index_W, spu->slb_replace);
- out_be64(&priv2->slb_vsid_RW,
- (get_vsid(mm->context.id, ea) << SLB_VSID_SHIFT)
- | SLB_VSID_USER);
- out_be64(&priv2->slb_esid_RW, (ea & ESID_MASK) | SLB_ESID_V);
+ out_be64(&priv2->slb_vsid_RW, vsid);
+ out_be64(&priv2->slb_esid_RW, esid);
+
+ spu->slb_replace++;
+ if (spu->slb_replace >= 8)
+ spu->slb_replace = 0;
spu_restart_dma(spu);
More information about the Linuxppc64-dev
mailing list