Skip to content

Commit 972dc3b

Browse files
Christoph Hellwigpaulburton
authored andcommitted
MIPS: simplify CONFIG_DMA_NONCOHERENT ifdefs
CONFIG_DMA_MAYBE_COHERENT already selects CONFIG_DMA_NONCOHERENT, so we can remove the extra conditions. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/19529/ Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: David Daney <david.daney@cavium.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de> Cc: Huacai Chen <chenhc@lemote.com> Cc: iommu@lists.linux-foundation.org Cc: linux-mips@linux-mips.org
1 parent 9c78eca commit 972dc3b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

arch/mips/include/asm/io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
590590
*
591591
* This API used to be exported; it now is for arch code internal use only.
592592
*/
593-
#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT)
593+
#ifdef CONFIG_DMA_NONCOHERENT
594594

595595
extern void (*_dma_cache_wback_inv)(unsigned long start, unsigned long size);
596596
extern void (*_dma_cache_wback)(unsigned long start, unsigned long size);
@@ -609,7 +609,7 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
609609
#define dma_cache_inv(start,size) \
610610
do { (void) (start); (void) (size); } while (0)
611611

612-
#endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
612+
#endif /* CONFIG_DMA_NONCOHERENT */
613613

614614
/*
615615
* Read a 32-bit register that requires a 64-bit read cycle on the bus.

arch/mips/mm/c-r4k.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ static void r4k_flush_icache_user_range(unsigned long start, unsigned long end)
830830
return __r4k_flush_icache_range(start, end, true);
831831
}
832832

833-
#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT)
833+
#ifdef CONFIG_DMA_NONCOHERENT
834834

835835
static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
836836
{
@@ -904,7 +904,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
904904
bc_inv(addr, size);
905905
__sync();
906906
}
907-
#endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
907+
#endif /* CONFIG_DMA_NONCOHERENT */
908908

909909
struct flush_cache_sigtramp_args {
910910
struct mm_struct *mm;

arch/mips/mm/cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ EXPORT_SYMBOL_GPL(local_flush_data_cache_page);
5656
EXPORT_SYMBOL(flush_data_cache_page);
5757
EXPORT_SYMBOL(flush_icache_all);
5858

59-
#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT)
59+
#ifdef CONFIG_DMA_NONCOHERENT
6060

6161
/* DMA cache operations. */
6262
void (*_dma_cache_wback_inv)(unsigned long start, unsigned long size);
@@ -65,7 +65,7 @@ void (*_dma_cache_inv)(unsigned long start, unsigned long size);
6565

6666
EXPORT_SYMBOL(_dma_cache_wback_inv);
6767

68-
#endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
68+
#endif /* CONFIG_DMA_NONCOHERENT */
6969

7070
/*
7171
* We could optimize the case where the cache argument is not BCACHE but

0 commit comments

Comments
 (0)