]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: dma-mapping: implement dma_get_sgtable()
authorRobin Murphy <Robin.Murphy@arm.com>
Fri, 17 Jul 2015 15:58:21 +0000 (16:58 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:40 +0000 (11:08 +0100)
commitcd5dc1c10678e2d792e490ef9be7bc82d7d9e292
treee62ad9b0949e30bc058c8aea75ce11dcb38e72da
parentdf639624b40b7caeff20905d740b4f51b9609c81
arm64: dma-mapping: implement dma_get_sgtable()

The default dma_common_get_sgtable() implementation relies on the CPU
address of the buffer being a regular lowmem address. This is not always
the case on arm64, since allocations from the various DMA pools may have
remapped vmalloc addresses, rendering the use of virt_to_page() invalid.

Fix this by providing our own implementation based on the fact that we
can safely derive a physical address from the DMA address in both cases.

CC: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[will: made static]
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/dma-mapping.c