diff options
author | Christoph Hellwig <hch@lst.de> | 2018-08-16 09:47:53 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-09-20 03:01:14 -0400 |
commit | 5748e1b35ba28368515d850e8087929a3a65e055 (patch) | |
tree | ef6a0559e014c9ab5653a10c2a902b7c2cf28e3f | |
parent | 684f7e91d3c72d555b82db13b2a48798e6097886 (diff) |
MIPS: don't select DMA_MAYBE_COHERENT from DMA_PERDEV_COHERENT
While both option select a form of conditional dma coherence they don't
actually share any code in the implementation, so untangle them.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Burton <paul.burton@mips.com>
-rw-r--r-- | arch/mips/Kconfig | 2 | ||||
-rw-r--r-- | arch/mips/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/c-r4k.c | 17 |
3 files changed, 10 insertions, 11 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 35511999156a..0b25180028b8 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1111,7 +1111,7 @@ config DMA_MAYBE_COHERENT | |||
1111 | 1111 | ||
1112 | config DMA_PERDEV_COHERENT | 1112 | config DMA_PERDEV_COHERENT |
1113 | bool | 1113 | bool |
1114 | select DMA_MAYBE_COHERENT | 1114 | select DMA_NONCOHERENT |
1115 | 1115 | ||
1116 | config DMA_NONCOHERENT | 1116 | config DMA_NONCOHERENT |
1117 | bool | 1117 | bool |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index c71d1eb7da59..6d840a44fa36 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -1067,7 +1067,7 @@ static int __init debugfs_mips(void) | |||
1067 | arch_initcall(debugfs_mips); | 1067 | arch_initcall(debugfs_mips); |
1068 | #endif | 1068 | #endif |
1069 | 1069 | ||
1070 | #if defined(CONFIG_DMA_MAYBE_COHERENT) && !defined(CONFIG_DMA_PERDEV_COHERENT) | 1070 | #ifdef CONFIG_DMA_MAYBE_COHERENT |
1071 | /* User defined DMA coherency from command line. */ | 1071 | /* User defined DMA coherency from command line. */ |
1072 | enum coherent_io_user_state coherentio = IO_COHERENCE_DEFAULT; | 1072 | enum coherent_io_user_state coherentio = IO_COHERENCE_DEFAULT; |
1073 | EXPORT_SYMBOL_GPL(coherentio); | 1073 | EXPORT_SYMBOL_GPL(coherentio); |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index a9ef057c79fe..05bd77727fb9 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -1955,22 +1955,21 @@ void r4k_cache_init(void) | |||
1955 | __flush_icache_user_range = r4k_flush_icache_user_range; | 1955 | __flush_icache_user_range = r4k_flush_icache_user_range; |
1956 | __local_flush_icache_user_range = local_r4k_flush_icache_user_range; | 1956 | __local_flush_icache_user_range = local_r4k_flush_icache_user_range; |
1957 | 1957 | ||
1958 | #if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT) | 1958 | #ifdef CONFIG_DMA_NONCOHERENT |
1959 | # if defined(CONFIG_DMA_PERDEV_COHERENT) | 1959 | #ifdef CONFIG_DMA_MAYBE_COHERENT |
1960 | if (0) { | 1960 | if (coherentio == IO_COHERENCE_ENABLED || |
1961 | # else | 1961 | (coherentio == IO_COHERENCE_DEFAULT && hw_coherentio)) { |
1962 | if ((coherentio == IO_COHERENCE_ENABLED) || | ||
1963 | ((coherentio == IO_COHERENCE_DEFAULT) && hw_coherentio)) { | ||
1964 | # endif | ||
1965 | _dma_cache_wback_inv = (void *)cache_noop; | 1962 | _dma_cache_wback_inv = (void *)cache_noop; |
1966 | _dma_cache_wback = (void *)cache_noop; | 1963 | _dma_cache_wback = (void *)cache_noop; |
1967 | _dma_cache_inv = (void *)cache_noop; | 1964 | _dma_cache_inv = (void *)cache_noop; |
1968 | } else { | 1965 | } else |
1966 | #endif /* CONFIG_DMA_MAYBE_COHERENT */ | ||
1967 | { | ||
1969 | _dma_cache_wback_inv = r4k_dma_cache_wback_inv; | 1968 | _dma_cache_wback_inv = r4k_dma_cache_wback_inv; |
1970 | _dma_cache_wback = r4k_dma_cache_wback_inv; | 1969 | _dma_cache_wback = r4k_dma_cache_wback_inv; |
1971 | _dma_cache_inv = r4k_dma_cache_inv; | 1970 | _dma_cache_inv = r4k_dma_cache_inv; |
1972 | } | 1971 | } |
1973 | #endif | 1972 | #endif /* CONFIG_DMA_NONCOHERENT */ |
1974 | 1973 | ||
1975 | build_clear_page(); | 1974 | build_clear_page(); |
1976 | build_copy_page(); | 1975 | build_copy_page(); |