Loading arch/arm/mm/dma-mapping.c +4 −2 Original line number Diff line number Diff line Loading @@ -791,13 +791,15 @@ static void *arm_dma_remap(struct device *dev, void *cpu_addr, dma_addr_t handle, size_t size, struct dma_attrs *attrs) { void *ptr; struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL); unsigned long offset = handle & ~PAGE_MASK; size = PAGE_ALIGN(size + offset); return __dma_alloc_remap(page, size, GFP_KERNEL, prot, __builtin_return_address(0)) + offset; ptr = __dma_alloc_remap(page, size, GFP_KERNEL, prot, __builtin_return_address(0)); return ptr ? ptr + offset : ptr; } static void arm_dma_unremap(struct device *dev, void *remapped_addr, Loading Loading
arch/arm/mm/dma-mapping.c +4 −2 Original line number Diff line number Diff line Loading @@ -791,13 +791,15 @@ static void *arm_dma_remap(struct device *dev, void *cpu_addr, dma_addr_t handle, size_t size, struct dma_attrs *attrs) { void *ptr; struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL); unsigned long offset = handle & ~PAGE_MASK; size = PAGE_ALIGN(size + offset); return __dma_alloc_remap(page, size, GFP_KERNEL, prot, __builtin_return_address(0)) + offset; ptr = __dma_alloc_remap(page, size, GFP_KERNEL, prot, __builtin_return_address(0)); return ptr ? ptr + offset : ptr; } static void arm_dma_unremap(struct device *dev, void *remapped_addr, Loading