diff options
author | Christoph Hellwig <hch@lst.de> | 2018-07-19 05:54:39 -0700 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-07-20 14:29:47 +0200 |
commit | 5411ad27dba1e59923f3865f90ab756fd6b9ab3c (patch) | |
tree | fba184190c76cefbaf233b08dbce9cb88adc8353 /arch/microblaze/mm | |
parent | bd05a58ddfd719015d66e8670af48feb386a3ca6 (diff) | |
download | linux-5411ad27dba1e59923f3865f90ab756fd6b9ab3c.tar.gz linux-5411ad27dba1e59923f3865f90ab756fd6b9ab3c.tar.bz2 linux-5411ad27dba1e59923f3865f90ab756fd6b9ab3c.zip |
microblaze: use generic dma_noncoherent_ops
Switch to the generic noncoherent direct mapping implementation.
This removes the direction-based optimizations in
sync_{single,sg}_for_{cpu,device} which were marked untestested and
do not match the usually very well tested {un,}map_{single,sg}
implementations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r-- | arch/microblaze/mm/consistent.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/microblaze/mm/consistent.c b/arch/microblaze/mm/consistent.c index b06c3a7faf20..b9a9c8c3397b 100644 --- a/arch/microblaze/mm/consistent.c +++ b/arch/microblaze/mm/consistent.c @@ -33,6 +33,7 @@ #include <linux/pci.h> #include <linux/interrupt.h> #include <linux/gfp.h> +#include <linux/dma-noncoherent.h> #include <asm/pgalloc.h> #include <linux/io.h> @@ -59,7 +60,8 @@ * uncached region. This will no doubt cause big problems if memory allocated * here is not also freed properly. -- JW */ -void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) +void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, + gfp_t gfp, unsigned long attrs) { unsigned long order, vaddr; void *ret; @@ -154,7 +156,6 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) return ret; } -EXPORT_SYMBOL(consistent_alloc); #ifdef CONFIG_MMU static pte_t *consistent_virt_to_pte(void *vaddr) @@ -178,7 +179,8 @@ unsigned long consistent_virt_to_pfn(void *vaddr) /* * free page(s) as defined by the above mapping. */ -void consistent_free(size_t size, void *vaddr) +void arch_dma_free(struct device *dev, size_t size, void *vaddr, + dma_addr_t dma_addr, unsigned long attrs) { struct page *page; @@ -218,7 +220,6 @@ void consistent_free(size_t size, void *vaddr) flush_tlb_all(); #endif } -EXPORT_SYMBOL(consistent_free); /* * make an area consistent. |