summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/gang.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-07-20 21:39:48 +0200
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 21:42:17 +0200
commitc5fc8d2a92461fcabd00dfd678204cba36b93119 (patch)
tree06af7ac73221494e0eef00f4f390faf53b24facf /arch/powerpc/platforms/cell/spufs/gang.c
parent8e68e2f248332a9c3fd4f08258f488c209bd3e0c (diff)
[CELL] cell: add placement computation for scheduling of affinity contexts
This patch provides the spu affinity placement logic for the spufs scheduler. Each time a gang is going to be scheduled, the placement of a reference context is defined. The placement of all other contexts with affinity from the gang is defined based on this reference context location and on a precomputed displacement offset. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/gang.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/gang.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/gang.c b/arch/powerpc/platforms/cell/spufs/gang.c
index 0a752ce67c8a..71a443253021 100644
--- a/arch/powerpc/platforms/cell/spufs/gang.c
+++ b/arch/powerpc/platforms/cell/spufs/gang.c
@@ -75,8 +75,10 @@ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx)
{
mutex_lock(&gang->mutex);
WARN_ON(ctx->gang != gang);
- if (!list_empty(&ctx->aff_list))
+ if (!list_empty(&ctx->aff_list)) {
list_del_init(&ctx->aff_list);
+ gang->aff_flags &= ~AFF_OFFSETS_SET;
+ }
list_del_init(&ctx->gang_list);
gang->contexts--;
mutex_unlock(&gang->mutex);