Displaying 3 results from an estimated 3 matches for "mutex_cnt".
2015 Mar 11
3
[PATCH] pmu/gk20a: PMU boot support.
...en)
+{
+ struct nvkm_pmu_impl *impl = (void *)nv_oclass(ppmu);
+ struct pmu_desc *pmu = &impl->pmudata;
+ struct pmu_mutex *mutex;
+ u32 data, owner, max_retry;
+
+ if (!pmu->initialized)
+ return -EINVAL;
+
+ BUG_ON(!token);
+ BUG_ON(!PMU_MUTEX_ID_IS_VALID(id));
+ BUG_ON(id > pmu->mutex_cnt);
+
+ mutex = &pmu->mutex[id];
+
+ owner = nv_rd32(ppmu, 0x0010a580 + (mutex->index * 4)) & 0xff;
+
+ if (*token != PMU_INVALID_MUTEX_OWNER_ID && *token == owner) {
+ BUG_ON(mutex->ref_cnt == 0);
+ nv_debug(ppmu, "already acquired by owner : 0x%08x", *token);
+...
2015 Mar 11
0
[PATCH] pmu/gk20a: PMU boot support.
...mpl->pmudata;
> + struct pmu_mutex *mutex;
> + u32 data, owner, max_retry;
> +
> + if (!pmu->initialized)
> + return -EINVAL;
> +
> + BUG_ON(!token);
> + BUG_ON(!PMU_MUTEX_ID_IS_VALID(id));
> + BUG_ON(id > pmu->mutex_cnt);
> +
> + mutex = &pmu->mutex[id];
> +
> + owner = nv_rd32(ppmu, 0x0010a580 + (mutex->index * 4)) & 0xff;
> +
> + if (*token != PMU_INVALID_MUTEX_OWNER_ID && *token == owner) {
> + BUG_ON(mutex->ref_cnt == 0);
> +...
2015 Mar 12
2
[PATCH] pmu/gk20a: PMU boot support.
...mpl->pmudata;
> + struct pmu_mutex *mutex;
> + u32 data, owner, max_retry;
> +
> + if (!pmu->initialized)
> + return -EINVAL;
> +
> + BUG_ON(!token);
> + BUG_ON(!PMU_MUTEX_ID_IS_VALID(id));
> + BUG_ON(id > pmu->mutex_cnt);
> +
> + mutex = &pmu->mutex[id];
> +
> + owner = nv_rd32(ppmu, 0x0010a580 + (mutex->index * 4)) & 0xff;
> +
> + if (*token != PMU_INVALID_MUTEX_OWNER_ID && *token == owner) {
> + BUG_ON(mutex->ref_cnt == 0);
> +...