summaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-25 11:01:35 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2019-07-01 11:17:00 +0200
commit69878ef47562f32e02d0b7975c990e1c0339320d (patch)
tree8a33017b7cacf7905dc0c2a85c6b64d283c51610 /arch/m68k/kernel
parent34dc63a5fb9b7f5dcb49f61552226c6314f347f6 (diff)
downloadlinux-69878ef47562f32e02d0b7975c990e1c0339320d.tar.gz
linux-69878ef47562f32e02d0b7975c990e1c0339320d.tar.bz2
linux-69878ef47562f32e02d0b7975c990e1c0339320d.zip
m68k: Implement arch_dma_prep_coherent()
When we remap memory as non-cached, to be used as a DMA coherent buffer, we should writeback all cache and invalidate the cache lines so that we make sure we have a clean slate. Implement this using the cache_push() helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r--arch/m68k/kernel/dma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c
index e7bf355589e7..30cd59caf037 100644
--- a/arch/m68k/kernel/dma.c
+++ b/arch/m68k/kernel/dma.c
@@ -18,6 +18,11 @@
#include <asm/pgalloc.h>
#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
+void arch_dma_prep_coherent(struct page *page, size_t size)
+{
+ cache_push(page_to_phys(page), size);
+}
+
pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot,
unsigned long attrs)
{