aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/spufs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-07-20 15:39:34 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 15:41:52 -0400
commit27b1ea091f0c088ecad0d492f37fbe7b8d54d7dc (patch)
tree5d54369e0b21877ee9ea57dddfab9733bcd82490 /arch/powerpc/platforms/cell/spufs/spufs.h
parent27ec41d3a1d4df2b7cd190e93aad22ab86a72aa1 (diff)
[CELL] spufs: make sure context are scheduled again after spu_acquire_saved
Currently a process is removed from the physical spu when spu_acquire_saved is saved but never put back. This patch adds a new spu_release_saved that is to be paired with spu_acquire_saved and put the process back if it has been in RUNNABLE state before. Niether Jeremy not be are entirely happy about this exact patch because it adds another spu_activate call outside of the owner thread, but I feel this is the best short-term fix we can come up with. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index fdace928437..1438aa2c346 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -40,6 +40,10 @@ enum {
40struct spu_context_ops; 40struct spu_context_ops;
41struct spu_gang; 41struct spu_gang;
42 42
43enum {
44 SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
45};
46
43struct spu_context { 47struct spu_context {
44 struct spu *spu; /* pointer to a physical SPU */ 48 struct spu *spu; /* pointer to a physical SPU */
45 struct spu_state csa; /* SPU context save area. */ 49 struct spu_state csa; /* SPU context save area. */
@@ -214,6 +218,7 @@ void spu_unmap_mappings(struct spu_context *ctx);
214void spu_forget(struct spu_context *ctx); 218void spu_forget(struct spu_context *ctx);
215int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags); 219int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
216void spu_acquire_saved(struct spu_context *ctx); 220void spu_acquire_saved(struct spu_context *ctx);
221void spu_release_saved(struct spu_context *ctx);
217 222
218int spu_activate(struct spu_context *ctx, unsigned long flags); 223int spu_activate(struct spu_context *ctx, unsigned long flags);
219void spu_deactivate(struct spu_context *ctx); 224void spu_deactivate(struct spu_context *ctx);