Loading drivers/base/dma-contiguous.c +7 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,13 @@ phys_addr_t cma_get_base(struct device *dev) return cma->base_pfn << PAGE_SHIFT; } unsigned long cma_get_size(struct device *dev) { struct cma *cma = dev_get_cma_area(dev); return cma->count << PAGE_SHIFT; } static void clear_cma_bitmap(struct cma *cma, unsigned long pfn, int count) { mutex_lock(&cma->lock); Loading drivers/soc/qcom/shared_memory.c +2 −1 Original line number Diff line number Diff line Loading @@ -66,13 +66,14 @@ static int msm_shared_heap_populate_base_and_size if (pnode != NULL) { const u32 *addr; u64 len; addr = of_get_address(pnode, 0, &len, NULL); if (!addr) { of_node_put(pnode); ret = -EINVAL; goto out; } *size = (size_t)len; *size = cma_get_size(priv); *base = cma_get_base(priv); of_node_put(pnode); } else { Loading include/linux/dma-contiguous.h +6 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct device; phys_addr_t cma_get_base(struct device *dev); unsigned long cma_get_size(struct device *dev); extern struct cma *dma_contiguous_def_area; Loading Loading @@ -154,6 +155,11 @@ static inline phys_addr_t cma_get_base(struct device *dev) return 0; } static inline unsigned long cma_get_size(struct device *dev) { return 0; } #endif #endif Loading Loading
drivers/base/dma-contiguous.c +7 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,13 @@ phys_addr_t cma_get_base(struct device *dev) return cma->base_pfn << PAGE_SHIFT; } unsigned long cma_get_size(struct device *dev) { struct cma *cma = dev_get_cma_area(dev); return cma->count << PAGE_SHIFT; } static void clear_cma_bitmap(struct cma *cma, unsigned long pfn, int count) { mutex_lock(&cma->lock); Loading
drivers/soc/qcom/shared_memory.c +2 −1 Original line number Diff line number Diff line Loading @@ -66,13 +66,14 @@ static int msm_shared_heap_populate_base_and_size if (pnode != NULL) { const u32 *addr; u64 len; addr = of_get_address(pnode, 0, &len, NULL); if (!addr) { of_node_put(pnode); ret = -EINVAL; goto out; } *size = (size_t)len; *size = cma_get_size(priv); *base = cma_get_base(priv); of_node_put(pnode); } else { Loading
include/linux/dma-contiguous.h +6 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct device; phys_addr_t cma_get_base(struct device *dev); unsigned long cma_get_size(struct device *dev); extern struct cma *dma_contiguous_def_area; Loading Loading @@ -154,6 +155,11 @@ static inline phys_addr_t cma_get_base(struct device *dev) return 0; } static inline unsigned long cma_get_size(struct device *dev) { return 0; } #endif #endif Loading