Lines Matching refs:dma_mem
24 struct dma_coherent_mem *dma_mem = NULL; in dma_init_coherent_memory() local
38 dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); in dma_init_coherent_memory()
39 if (!dma_mem) in dma_init_coherent_memory()
41 dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); in dma_init_coherent_memory()
42 if (!dma_mem->bitmap) in dma_init_coherent_memory()
45 dma_mem->virt_base = mem_base; in dma_init_coherent_memory()
46 dma_mem->device_base = device_addr; in dma_init_coherent_memory()
47 dma_mem->pfn_base = PFN_DOWN(phys_addr); in dma_init_coherent_memory()
48 dma_mem->size = pages; in dma_init_coherent_memory()
49 dma_mem->flags = flags; in dma_init_coherent_memory()
50 spin_lock_init(&dma_mem->spinlock); in dma_init_coherent_memory()
52 *mem = dma_mem; in dma_init_coherent_memory()
60 kfree(dma_mem); in dma_init_coherent_memory()
78 if (dev->dma_mem) in dma_assign_coherent_memory()
81 dev->dma_mem = mem; in dma_assign_coherent_memory()
108 struct dma_coherent_mem *mem = dev->dma_mem; in dma_release_declared_memory()
113 dev->dma_mem = NULL; in dma_release_declared_memory()
120 struct dma_coherent_mem *mem = dev->dma_mem; in dma_mark_declared_memory_occupied()
165 mem = dev->dma_mem; in dma_alloc_from_coherent()
215 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; in dma_release_from_coherent()
249 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; in dma_mmap_from_coherent()
299 dev->dma_mem = NULL; in rmem_dma_device_release()