Displaying 11 results from an estimated 11 matches for "vaddr_nod".
Did you mean:
vaddr_node
2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
...eau/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index fc419bb8eab7..681b2541229a 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -57,6 +57,8 @@ struct gk20a_instobj {
/* CPU mapping */
u32 *vaddr;
struct list_head vaddr_node;
+ /* How many clients are using vaddr? */
+ u32 use_cpt;
};
#define gk20a_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...
2015 Nov 11
0
[PATCH] instmem/gk20a: fix race conditions
...rm/nouveau/nvkm/subdev/instmem/gk20a.c
> index fc419bb8eab7..681b2541229a 100644
> --- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
> +++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
> @@ -57,6 +57,8 @@ struct gk20a_instobj {
> /* CPU mapping */
> u32 *vaddr;
> struct list_head vaddr_node;
> + /* How many clients are using vaddr? */
> + u32 use_cpt;
> };
> #define gk20a_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 whil...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...u/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index 681b2541229a..4c20fec64d96 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -56,9 +56,6 @@ struct gk20a_instobj {
/* CPU mapping */
u32 *vaddr;
- struct list_head vaddr_node;
- /* How many clients are using vaddr? */
- u32 use_cpt;
};
#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
@@ -68,7 +65,6 @@ struct gk20a_instobj {
struct gk20a_instobj_dma {
struct gk20a_instobj base;
- u32 *cpuaddr;
dma_addr_t handle;
struct nvkm_mm_node r...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...eau/nvkm/subdev/instmem/gk20a.c
> index 681b2541229a..4c20fec64d96 100644
> --- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
> +++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
> @@ -56,9 +56,6 @@ struct gk20a_instobj {
>
> /* CPU mapping */
> u32 *vaddr;
> - struct list_head vaddr_node;
> - /* How many clients are using vaddr? */
> - u32 use_cpt;
> };
> #define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
>
> @@ -68,7 +65,6 @@ struct gk20a_instobj {
> struct gk20a_instobj_dma {
> struct gk20a_instobj base;
>
> - u32 *cpu...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...d long flags;
- spin_lock_irqsave(&imem->lock, flags);
+ mutex_lock(&imem->lock);
/* we should at least have one user to release... */
if (WARN_ON(node->use_cpt == 0))
@@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory)
list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
out:
- spin_unlock_irqrestore(&imem->lock, flags);
+ mutex_unlock(&imem->lock);
wmb();
nvkm_ltc_invalidate(ltc);
@@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->base.imem;
struct...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...instobj(memory);
struct gk20a_instmem *imem = node->imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
- unsigned long flags;
-
- spin_lock_irqsave(&imem->lock, flags);
/* add ourselves to the LRU list so our CPU mapping can be freed */
list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
- spin_unlock_irqrestore(&imem->lock, flags);
+ spin_unlock_irqrestore(&imem->lock, imem->flags);
wmb();
nvkm_ltc_invalidate(ltc);
--
2.6.1
2023 Dec 08
1
[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy
...obj(p) container_of((p), struct gk20a_instobj, memory)
+#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, base.memory)
/*
* Used for objects allocated using the DMA API
@@ -148,7 +148,7 @@ gk20a_instobj_iommu_recycle_vaddr(struct gk20a_instobj_iommu *obj)
list_del(&obj->vaddr_node);
vunmap(obj->base.vaddr);
obj->base.vaddr = NULL;
- imem->vaddr_use -= nvkm_memory_size(&obj->base.memory);
+ imem->vaddr_use -= nvkm_memory_size(&obj->base.base.memory);
nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use,...
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...ck, flags);
>> + mutex_lock(&imem->lock);
>>
>> /* we should at least have one user to release... */
>> if (WARN_ON(node->use_cpt == 0))
>> @@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory)
>> list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
>>
>> out:
>> - spin_unlock_irqrestore(&imem->lock, flags);
>> + mutex_unlock(&imem->lock);
>>
>> wmb();
>> nvkm_ltc_invalidate(ltc);
>> @@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *...
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
...tmem *imem = node->imem;
> struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&imem->lock, flags);
>
> /* add ourselves to the LRU list so our CPU mapping can be freed */
> list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
>
> - spin_unlock_irqrestore(&imem->lock, flags);
> + spin_unlock_irqrestore(&imem->lock, imem->flags);
>
> wmb();
> nvkm_ltc_invalidate(ltc);
>
-------------- next part --------------
A non-text attachment was scrubbed......
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...qsave(&imem->lock, flags);
> + mutex_lock(&imem->lock);
>
> /* we should at least have one user to release... */
> if (WARN_ON(node->use_cpt == 0))
> @@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory)
> list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
>
> out:
> - spin_unlock_irqrestore(&imem->lock, flags);
> + mutex_unlock(&imem->lock);
>
> wmb();
> nvkm_ltc_invalidate(ltc);
> @@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory)
> struct gk20a_...
2023 Dec 14
1
[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy
...20a_instobj, memory)
> +#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, base.memory)
>
> /*
> * Used for objects allocated using the DMA API
> @@ -148,7 +148,7 @@ gk20a_instobj_iommu_recycle_vaddr(struct gk20a_instobj_iommu *obj)
> list_del(&obj->vaddr_node);
> vunmap(obj->base.vaddr);
> obj->base.vaddr = NULL;
> - imem->vaddr_use -= nvkm_memory_size(&obj->base.memory);
> + imem->vaddr_use -= nvkm_memory_size(&obj->base.base.memory);
> nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n&qu...