]> err.no Git - linux-2.6/blobdiff - arch/powerpc/platforms/cell/spufs/spufs.h
[POWERPC] spu sched: static timeslicing for SCHED_RR contexts
[linux-2.6] / arch / powerpc / platforms / cell / spufs / spufs.h
index 7f5a4fc03c0005fac3a858f20fa8d85b28f4448b..0c437891dfd5cf6b25af3cc1248b033192627ea1 100644 (file)
@@ -39,6 +39,11 @@ enum {
 struct spu_context_ops;
 struct spu_gang;
 
+/* ctx->sched_flags */
+enum {
+       SPU_SCHED_WAKE = 0,
+};
+
 struct spu_context {
        struct spu *spu;                  /* pointer to a physical SPU */
        struct spu_state csa;             /* SPU context save area. */
@@ -77,6 +82,10 @@ struct spu_context {
 
        /* scheduler fields */
        struct list_head rq;
+       struct delayed_work sched_work;
+       unsigned long sched_flags;
+       unsigned long rt_priority;
+       int policy;
        int prio;
 };
 
@@ -179,12 +188,18 @@ int put_spu_context(struct spu_context *ctx);
 void spu_unmap_mappings(struct spu_context *ctx);
 
 void spu_forget(struct spu_context *ctx);
-int spu_acquire_runnable(struct spu_context *ctx);
+int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
 void spu_acquire_saved(struct spu_context *ctx);
 int spu_acquire_exclusive(struct spu_context *ctx);
-int spu_activate(struct spu_context *ctx, u64 flags);
+enum {
+       SPU_ACTIVATE_NOWAKE = 1,
+};
+int spu_activate(struct spu_context *ctx, unsigned long flags);
 void spu_deactivate(struct spu_context *ctx);
 void spu_yield(struct spu_context *ctx);
+void spu_start_tick(struct spu_context *ctx);
+void spu_stop_tick(struct spu_context *ctx);
+void spu_sched_tick(struct work_struct *work);
 int __init spu_sched_init(void);
 void __exit spu_sched_exit(void);