Displaying 4 results from an estimated 4 matches for "gk20a_instobj_recycle_vaddr".
2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
...k20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
@@ -158,27 +160,35 @@ gk20a_instobj_cpu_map_iommu(struct nvkm_memory *memory)
}
/*
- * Must be called while holding gk20a_instmem_lock
+ * Recycle the vaddr of obj. Must be called with gk20a_instmem::lock held.
+ */
+static void
+gk20a_instobj_recycle_vaddr(struct gk20a_instobj *obj)
+{
+ struct gk20a_instmem *imem = obj->imem;
+ /* there should not be any user left... */
+ WARN_ON(obj->use_cpt);
+ list_del(&obj->vaddr_node);
+ vunmap(obj->vaddr);
+ obj->vaddr = NULL;
+ imem->vaddr_use -= nvkm_memory_size(&obj->memory);
+...
2015 Nov 11
0
[PATCH] instmem/gk20a: fix race conditions
...tobj, memory)
>
> @@ -158,27 +160,35 @@ gk20a_instobj_cpu_map_iommu(struct nvkm_memory *memory)
> }
>
> /*
> - * Must be called while holding gk20a_instmem_lock
> + * Recycle the vaddr of obj. Must be called with gk20a_instmem::lock held.
> + */
> +static void
> +gk20a_instobj_recycle_vaddr(struct gk20a_instobj *obj)
> +{
> + struct gk20a_instmem *imem = obj->imem;
> + /* there should not be any user left... */
> + WARN_ON(obj->use_cpt);
> + list_del(&obj->vaddr_node);
> + vunmap(obj->vaddr);
> + obj->vaddr = NULL;
> + imem->vaddr_use -= n...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...a_instobj_iommu *node = gk20a_instobj_iommu(memory);
- int npages = nvkm_memory_size(memory) >> 12;
-
- return vmap(node->pages, npages, VM_MAP,
- pgprot_writecombine(PAGE_KERNEL));
-}
-
/*
* Recycle the vaddr of obj. Must be called with gk20a_instmem::lock held.
*/
static void
-gk20a_instobj_recycle_vaddr(struct gk20a_instobj *obj)
+gk20a_instobj_iommu_recycle_vaddr(struct gk20a_instobj_iommu *obj)
{
- struct gk20a_instmem *imem = obj->imem;
+ struct gk20a_instmem *imem = obj->base.imem;
/* there should not be any user left... */
WARN_ON(obj->use_cpt);
list_del(&obj->vaddr_nod...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...t; - int npages = nvkm_memory_size(memory) >> 12;
> -
> - return vmap(node->pages, npages, VM_MAP,
> - pgprot_writecombine(PAGE_KERNEL));
> -}
> -
> /*
> * Recycle the vaddr of obj. Must be called with gk20a_instmem::lock held.
> */
> static void
> -gk20a_instobj_recycle_vaddr(struct gk20a_instobj *obj)
> +gk20a_instobj_iommu_recycle_vaddr(struct gk20a_instobj_iommu *obj)
> {
> - struct gk20a_instmem *imem = obj->imem;
> + struct gk20a_instmem *imem = obj->base.imem;
> /* there should not be any user left... */
> WARN_ON(obj->use_cpt);
>...