25 #include <linux/slab.h>
27 #include <linux/sched.h>
51 kref_init(&ctx->kref);
59 ctx->state = SPU_STATE_SAVED;
62 INIT_LIST_HEAD(&ctx->rq);
63 INIT_LIST_HEAD(&ctx->aff_list);
69 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
71 ctx->stats.tstamp = timespec_to_ns(&ts);
103 kref_get(&ctx->
kref);
123 if (ctx->
state != SPU_STATE_SAVED)
162 ret = spu_acquire(ctx);
166 if (ctx->
state != SPU_STATE_SAVED) {