From b0230a695232679d5bbf9af8499801ff90cee80d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 21 May 2017 12:30:35 +0200 Subject: microblaze: remove DMA_ERROR_CODE microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index 3fad5e722a66..e15cd2f76e23 100644 --- a/arch/microblaze/include/asm/dma-mapping.h +++ b/arch/microblaze/include/asm/dma-mapping.h @@ -28,8 +28,6 @@ #include #include -#define DMA_ERROR_CODE (~(dma_addr_t)0x0) - #define __dma_alloc_coherent(dev, gfp, size, handle) NULL #define __dma_free_coherent(size, addr) ((void)0) -- cgit From 07c75d7a6b9eae24ab72c6eb2fbd39963775b0bf Mon Sep 17 00:00:00 2001 From: Vladimir Murzin Date: Wed, 28 Jun 2017 10:16:57 +0100 Subject: drivers: dma-mapping: allow dma_common_mmap() for NOMMU Currently, internals of dma_common_mmap() is compiled out if build is done for either NOMMU or target which explicitly says it does not have/want coherent DMA mmap. It turned out that dma_common_mmap() can be handy in NOMMU setup (at least for ARM). This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP, thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays unchanged. ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1) already has mmap callback which can handle (at some extent) NOMMU 2) already defines dummy pgprot_noncached() for NOMMU build. c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP. Cc: Steven Miao Cc: Geert Uytterhoeven Cc: Michal Simek Cc: Yoshinori Sato Cc: Rich Felker Cc: Chris Zankel Cc: Max Filippov Suggested-by: Christoph Hellwig Signed-off-by: Vladimir Murzin Tested-by: Benjamin Gaignard --- arch/microblaze/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/microblaze') diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 85885a501dce..8ba7b7c01418 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -2,6 +2,7 @@ config MICROBLAZE def_bool y select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_MIGHT_HAVE_PC_PARPORT + select ARCH_NO_COHERENT_DMA_MMAP if !MMU select ARCH_WANT_IPC_PARSE_VERSION select BUILDTIME_EXTABLE_SORT select CLKSRC_OF -- cgit