summaryrefslogtreecommitdiff
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-10-29 13:01:37 +0300
committerChristoph Hellwig <hch@lst.de>2019-11-11 12:52:15 +0300
commit34dc0ea6bc960f1f57b2148f01a3f4da23f87013 (patch)
treef6d10010989435562d0ece0971ed992febe6c26c /arch/mips/mm
parent4e1003aa56a7d60ddb048e43a7a51368fcfe36af (diff)
downloadlinux-34dc0ea6bc960f1f57b2148f01a3f4da23f87013.tar.xz
dma-direct: provide mmap and get_sgtable method overrides
For dma-direct we know that the DMA address is an encoding of the physical address that we can trivially decode. Use that fact to provide implementations that do not need the arch_dma_coherent_to_pfn architecture hook. Note that we still can only support mmap of non-coherent memory only if the architecture provides a way to set an uncached bit in the page tables. This must be true for architectures that use the generic remap helpers, but other architectures can also manually select it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/dma-noncoherent.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c
index 1d4d57dd9acf..fcf6d3eaac66 100644
--- a/arch/mips/mm/dma-noncoherent.c
+++ b/arch/mips/mm/dma-noncoherent.c
@@ -59,12 +59,6 @@ void *cached_kernel_address(void *addr)
return __va(addr) - UNCAC_BASE;
}
-long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr,
- dma_addr_t dma_addr)
-{
- return page_to_pfn(virt_to_page(cached_kernel_address(cpu_addr)));
-}
-
static inline void dma_sync_virt(void *addr, size_t size,
enum dma_data_direction dir)
{