]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/spufs/context.c
Merge branch 'omap-clock-fixes' of git://git.pwsan.com/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / spufs / context.c
index 6653ddbed0483c4679755ee23b132fbc57091cb3..db5398c0339f4a1bbb6bccaccf59c4cc97c6b9a3 100644 (file)
@@ -35,6 +35,8 @@ atomic_t nr_spu_contexts = ATOMIC_INIT(0);
 struct spu_context *alloc_spu_context(struct spu_gang *gang)
 {
        struct spu_context *ctx;
+       struct timespec ts;
+
        ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
        if (!ctx)
                goto out;
@@ -64,6 +66,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
        __spu_update_sched_info(ctx);
        spu_set_timeslice(ctx);
        ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
+       ktime_get_ts(&ts);
+       ctx->stats.tstamp = timespec_to_ns(&ts);
 
        atomic_inc(&nr_spu_contexts);
        goto out;