aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
context:
space:
mode:
authorBob Nelson <rrnelson@linux.vnet.ibm.com>2007-07-20 15:39:53 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 15:42:24 -0400
commit1474855d0878cced6f39f51f3c2bd7428b44cb1e (patch)
treecbad42404bfc0f7222d0a88e4ed9b0e9e0d0cb50 /arch/powerpc/platforms/cell/spufs/sched.c
parent36aaccc1e96481e8310b1d13600096da0f24ff43 (diff)
[CELL] oprofile: add support to OProfile for profiling CELL BE SPUs
From: Maynard Johnson <mpjohn@us.ibm.com> This patch updates the existing arch/powerpc/oprofile/op_model_cell.c to add in the SPU profiling capabilities. In addition, a 'cell' subdirectory was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code. Exports spu_set_profile_private_kref and spu_get_profile_private_kref which are used by OProfile to store private profile information in spufs data structures. Also incorporated several fixes from other patches (rrn). Check pointer returned from kzalloc. Eliminated unnecessary cast. Better error handling and cleanup in the related area. 64-bit unsigned long parameter was being demoted to 32-bit unsigned int and eventually promoted back to unsigned long. Signed-off-by: Carl Love <carll@us.ibm.com> Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com> Signed-off-by: Bob Nelson <rrnelson@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 88ec333e90d3..44e2338a05d5 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -274,6 +274,7 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
274 ctx->spu = spu; 274 ctx->spu = spu;
275 ctx->ops = &spu_hw_ops; 275 ctx->ops = &spu_hw_ops;
276 spu->pid = current->pid; 276 spu->pid = current->pid;
277 spu->tgid = current->tgid;
277 spu_associate_mm(spu, ctx->owner); 278 spu_associate_mm(spu, ctx->owner);
278 spu->ibox_callback = spufs_ibox_callback; 279 spu->ibox_callback = spufs_ibox_callback;
279 spu->wbox_callback = spufs_wbox_callback; 280 spu->wbox_callback = spufs_wbox_callback;
@@ -456,6 +457,7 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
456 spu->dma_callback = NULL; 457 spu->dma_callback = NULL;
457 spu_associate_mm(spu, NULL); 458 spu_associate_mm(spu, NULL);
458 spu->pid = 0; 459 spu->pid = 0;
460 spu->tgid = 0;
459 ctx->ops = &spu_backing_ops; 461 ctx->ops = &spu_backing_ops;
460 spu->flags = 0; 462 spu->flags = 0;
461 spu->ctx = NULL; 463 spu->ctx = NULL;
@@ -737,7 +739,7 @@ void spu_deactivate(struct spu_context *ctx)
737} 739}
738 740
739/** 741/**
740 * spu_yield - yield a physical spu if others are waiting 742 * spu_yield - yield a physical spu if others are waiting
741 * @ctx: spu context to yield 743 * @ctx: spu context to yield
742 * 744 *
743 * Check if there is a higher priority context waiting and if yes 745 * Check if there is a higher priority context waiting and if yes