X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fspu.h;h=a0f7fc8e23bb58962e1b3598cae5b663aa86d652;hb=1474855d0878cced6f39f51f3c2bd7428b44cb1e;hp=24f352da286988e9081aa0287aa090b8fdb40070;hpb=36aaccc1e96481e8310b1d13600096da0f24ff43;p=linux-block.git diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 24f352da2869..a0f7fc8e23bb 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -138,6 +138,7 @@ struct spu { struct spu_runqueue *rq; unsigned long long timestamp; pid_t pid; + pid_t tgid; int class_0_pending; spinlock_t register_lock; @@ -217,6 +218,20 @@ extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm); struct mm_struct; extern void spu_flush_all_slbs(struct mm_struct *mm); +/* This interface allows a profiler (e.g., OProfile) to store a ref + * to spu context information that it creates. This caching technique + * avoids the need to recreate this information after a save/restore operation. + * + * Assumes the caller has already incremented the ref count to + * profile_info; then spu_context_destroy must call kref_put + * on prof_info_kref. + */ +void spu_set_profile_private_kref(struct spu_context *ctx, + struct kref *prof_info_kref, + void ( * prof_info_release) (struct kref *kref)); + +void *spu_get_profile_private_kref(struct spu_context *ctx); + /* system callbacks from the SPU */ struct spu_syscall_block { u64 nr_ret;