diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2023-02-22 13:24:25 +0000 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2023-03-24 14:07:13 +0100 |
commit | 600efe35d54961dd026f04c6ea5b4074b3284c87 (patch) | |
tree | 42d0ce74b560fcfdbfd86061b507f4c267cf83a4 /arch/mips | |
parent | e0b7fd1207a8ec47091439fb62dd87ca6f5b4ad3 (diff) | |
download | linux-stable-600efe35d54961dd026f04c6ea5b4074b3284c87.tar.gz linux-stable-600efe35d54961dd026f04c6ea5b4074b3284c87.tar.bz2 linux-stable-600efe35d54961dd026f04c6ea5b4074b3284c87.zip |
MIPS: c-r4k: Always install dma flush functions
As nowadays DMA coherence is managed per device, it is possible
to have a system that is defaulted to coherent dma but still
have noncoherent device that needs to use those flush functions.
Just install them unconditionally.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index a549fa98c2f4..7d447050a20b 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1867,15 +1867,9 @@ void r4k_cache_init(void) __local_flush_icache_user_range = local_r4k_flush_icache_user_range; #ifdef CONFIG_DMA_NONCOHERENT - if (dma_default_coherent) { - _dma_cache_wback_inv = (void *)cache_noop; - _dma_cache_wback = (void *)cache_noop; - _dma_cache_inv = (void *)cache_noop; - } else { - _dma_cache_wback_inv = r4k_dma_cache_wback_inv; - _dma_cache_wback = r4k_dma_cache_wback_inv; - _dma_cache_inv = r4k_dma_cache_inv; - } + _dma_cache_wback_inv = r4k_dma_cache_wback_inv; + _dma_cache_wback = r4k_dma_cache_wback_inv; + _dma_cache_inv = r4k_dma_cache_inv; #endif /* CONFIG_DMA_NONCOHERENT */ build_clear_page(); |