drivers: dma-coherent: Change order of allocation to PAGE_SIZE
Subsystems (2)
RFC 1/1 drivers: dma-coherent: Change order of allocation to PAGE_SIZE
dma_alloc_from_coherent uses get_order(size) which makes carve-out allocations not aligned on order boundaries to fail even though they are page aligned. So wanted to know why is it required to have the size aligned on order boundary. Changing it to get_order(PAGE_SIZE) makes the non aligned carve-out allocations to go through.
Signed-off-by Sricharan R <[email protected]>
--- drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/dma-coherent.c +1 -1
@@ -156,7 +156,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size, dma_addr_t *dma_handle, void **ret) {struct dma_coherent_mem *mem; -int order =get_order (size); +int order =get_order (PAGE_SIZE );unsigned long flags;int pageno;
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation