search for: rw_sema

Displaying 3 results from an estimated 3 matches for "rw_sema".

2015 Mar 11
3
[PATCH] pmu/gk20a: PMU boot support.
...mit = start + len - 1; + + allocator->bitmap = kcalloc(BITS_TO_LONGS(len), sizeof(long), + GFP_KERNEL); + if (!allocator->bitmap) + return -ENOMEM; + + allocator_dbg(allocator, "%s : base %d, limit %d", + allocator->name, allocator->base); + + init_rwsem(&allocator->rw_sema); + + allocator->alloc = nvkm_pmu_allocator_block_alloc; + allocator->free = nvkm_pmu_allocator_block_free; + + return 0; +} + +/* destroy allocator, free all remaining blocks if any */ +void nvkm_pmu_allocator_destroy(struct nvkm_pmu_allocator *allocator) +{ + down_write(&allocator->r...
2015 Mar 11
0
[PATCH] pmu/gk20a: PMU boot support.
...GFP_KERNEL); > + if (!allocator->bitmap) > + return -ENOMEM; > + > + allocator_dbg(allocator, "%s : base %d, limit %d", > + allocator->name, allocator->base); > + > + init_rwsem(&allocator->rw_sema); > + > + allocator->alloc = nvkm_pmu_allocator_block_alloc; > + allocator->free = nvkm_pmu_allocator_block_free; > + > + return 0; > +} > + > +/* destroy allocator, free all remaining blocks if any */ > +void nvkm_pmu_allocator_destroy(struct nvkm...
2015 Mar 12
2
[PATCH] pmu/gk20a: PMU boot support.
...GFP_KERNEL); > + if (!allocator->bitmap) > + return -ENOMEM; > + > + allocator_dbg(allocator, "%s : base %d, limit %d", > + allocator->name, allocator->base); > + > + init_rwsem(&allocator->rw_sema); > + > + allocator->alloc = nvkm_pmu_allocator_block_alloc; > + allocator->free = nvkm_pmu_allocator_block_free; > + > + return 0; > +} > + > +/* destroy allocator, free all remaining blocks if any */ > +void nvkm_pmu_allocator_destroy(struct nvkm...