[FYI/PATCH 3/3] increase direct mapping sizes for spufs
Utz Bacher
utz.bacher at de.ibm.com
Tue Feb 14 07:38:50 EST 2006
This patch applies on top of Arnd's postings (patch ids 4192, 4185, 4190)
from 1/17 (on top of 2.6.15.4).
It maps 16k instead of 4k for each problem-state mapped subarea. The mfc
mapping contains the Multisource Synchronization Area, the MFC Command
Parameter Area and the MFC Command Queue Control Area; the cntl mapping
contains the SPU Control Area while the signal1 and signal2 mapping
contain the relevant Signal-Notification Area.
This allows libspe to build on direct problem state mapping and is
recommended for running on a Cell blade today. The code may well change
in the near future.
Cc: Mark Nutter <mnutter at us.ibm.com>
Cc: Arnd Bergmann <arndb at de.ibm.com>
From: Ulrich Weigand <Ulrich.Weigand at de.ibm.com>
Signed-off-by: Utz Bacher <utz.bacher at de.ibm.com>
Index: linux-2.6.15.4/arch/powerpc/platforms/cell/spufs/context.c
===================================================================
--- linux-2.6.15.4.orig/arch/powerpc/platforms/cell/spufs/context.c
+++ linux-2.6.15.4/arch/powerpc/platforms/cell/spufs/context.c
@@ -116,13 +116,13 @@
if (ctx->local_store)
unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
if (ctx->mfc)
- unmap_mapping_range(ctx->mfc, 0, 0x1000, 1);
+ unmap_mapping_range(ctx->mfc, 0, 0x4000, 1);
if (ctx->cntl)
- unmap_mapping_range(ctx->cntl, 0, 0x1000, 1);
+ unmap_mapping_range(ctx->cntl, 0, 0x4000, 1);
if (ctx->signal1)
- unmap_mapping_range(ctx->signal1, 0, 0x1000, 1);
+ unmap_mapping_range(ctx->signal1, 0, 0x4000, 1);
if (ctx->signal2)
- unmap_mapping_range(ctx->signal2, 0, 0x1000, 1);
+ unmap_mapping_range(ctx->signal2, 0, 0x4000, 1);
}
int spu_acquire_runnable(struct spu_context *ctx)
Index: linux-2.6.15.4/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linux-2.6.15.4.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linux-2.6.15.4/arch/powerpc/platforms/cell/spufs/file.c
@@ -158,7 +158,7 @@
int ret;
offset += vma->vm_pgoff << PAGE_SHIFT;
- if (offset > 0x1000)
+ if (offset >= 0x4000)
goto out;
ret = spu_acquire_runnable(ctx);
More information about the Linuxppc64-dev
mailing list