Message ID | 1436419045-21407-1-git-send-email-sricharan@codeaurora.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Andy Gross |
Headers | show |
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 55b8398..72bdc6f 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -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;
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 <sricharan@codeaurora.org> --- drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)