Lines Matching refs:a

86 	struct dma_heap_attachment *a;  in system_heap_attach()  local
89 a = kzalloc(sizeof(*a), GFP_KERNEL); in system_heap_attach()
90 if (!a) in system_heap_attach()
95 kfree(a); in system_heap_attach()
99 a->table = table; in system_heap_attach()
100 a->dev = attachment->dev; in system_heap_attach()
101 INIT_LIST_HEAD(&a->list); in system_heap_attach()
102 a->mapped = false; in system_heap_attach()
104 attachment->priv = a; in system_heap_attach()
107 list_add(&a->list, &buffer->attachments); in system_heap_attach()
117 struct dma_heap_attachment *a = attachment->priv; in system_heap_detach() local
120 list_del(&a->list); in system_heap_detach()
123 sg_free_table(a->table); in system_heap_detach()
124 kfree(a->table); in system_heap_detach()
125 kfree(a); in system_heap_detach()
131 struct dma_heap_attachment *a = attachment->priv; in system_heap_map_dma_buf() local
132 struct sg_table *table = a->table; in system_heap_map_dma_buf()
139 a->mapped = true; in system_heap_map_dma_buf()
147 struct dma_heap_attachment *a = attachment->priv; in system_heap_unmap_dma_buf() local
149 a->mapped = false; in system_heap_unmap_dma_buf()
157 struct dma_heap_attachment *a; in system_heap_dma_buf_begin_cpu_access() local
164 list_for_each_entry(a, &buffer->attachments, list) { in system_heap_dma_buf_begin_cpu_access()
165 if (!a->mapped) in system_heap_dma_buf_begin_cpu_access()
167 dma_sync_sgtable_for_cpu(a->dev, a->table, direction); in system_heap_dma_buf_begin_cpu_access()
178 struct dma_heap_attachment *a; in system_heap_dma_buf_end_cpu_access() local
185 list_for_each_entry(a, &buffer->attachments, list) { in system_heap_dma_buf_end_cpu_access()
186 if (!a->mapped) in system_heap_dma_buf_end_cpu_access()
188 dma_sync_sgtable_for_device(a->dev, a->table, direction); in system_heap_dma_buf_end_cpu_access()