Lines Matching refs:dev
258 struct page *dma_alloc_from_contiguous(struct device *dev, size_t count, in dma_alloc_from_contiguous() argument
264 return cma_alloc(dev_get_cma_area(dev), count, align, no_warn); in dma_alloc_from_contiguous()
277 bool dma_release_from_contiguous(struct device *dev, struct page *pages, in dma_release_from_contiguous() argument
280 return cma_release(dev_get_cma_area(dev), pages, count); in dma_release_from_contiguous()
305 struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp) in dma_alloc_contiguous() argument
308 int nid = dev_to_node(dev); in dma_alloc_contiguous()
314 if (dev->cma_area) in dma_alloc_contiguous()
315 return cma_alloc_aligned(dev->cma_area, size, gfp); in dma_alloc_contiguous()
348 void dma_free_contiguous(struct device *dev, struct page *page, size_t size) in dma_free_contiguous() argument
353 if (dev->cma_area) { in dma_free_contiguous()
354 if (cma_release(dev->cma_area, page, count)) in dma_free_contiguous()
384 static int rmem_cma_device_init(struct reserved_mem *rmem, struct device *dev) in rmem_cma_device_init() argument
386 dev->cma_area = rmem->priv; in rmem_cma_device_init()
391 struct device *dev) in rmem_cma_device_release() argument
393 dev->cma_area = NULL; in rmem_cma_device_release()