[PATCH 3/6] MIPS: move the {no,}nocoherentio options to the malta setup code
From: Christoph Hellwig <hch@lst.de>
Date: 2021-02-08 14:53:04
Also in:
linux-iommu, lkml
Subsystem:
mips, the rest · Maintainers:
Thomas Bogendoerfer, Linus Torvalds
There are only two MIPS platforms that are conditionally DMA coherent. Of those alchemcy forces the coherentcy base on the platform, while malta allows a mix of hardware defaults and manual overrides. Move the command line options for these overrides to the malta setup code, as they can't have an effect for alchemy. Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/mips/kernel/setup.c | 16 ---------------- arch/mips/mti-malta/malta-setup.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 7e1f8e2774373d..8e205a4e18c27b 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c@@ -811,20 +811,4 @@ arch_initcall(debugfs_mips); enum coherent_io_user_state coherentio = IO_COHERENCE_DEFAULT; EXPORT_SYMBOL_GPL(coherentio); int hw_coherentio; /* Actual hardware supported DMA coherency setting. */ - -static int __init setcoherentio(char *str) -{ - coherentio = IO_COHERENCE_ENABLED; - pr_info("Hardware DMA cache coherency (command line)\n"); - return 0; -} -early_param("coherentio", setcoherentio); - -static int __init setnocoherentio(char *str) -{ - coherentio = IO_COHERENCE_DISABLED; - pr_info("Software DMA cache coherency (command line)\n"); - return 0; -} -early_param("nocoherentio", setnocoherentio); #endif
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index f3fec5a5a07c76..33449a2692c3a3 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c@@ -90,6 +90,22 @@ static void __init fd_activate(void) } #endif +static int __init setcoherentio(char *str) +{ + coherentio = IO_COHERENCE_ENABLED; + pr_info("Hardware DMA cache coherency (command line)\n"); + return 0; +} +early_param("coherentio", setcoherentio); + +static int __init setnocoherentio(char *str) +{ + coherentio = IO_COHERENCE_DISABLED; + pr_info("Software DMA cache coherency (command line)\n"); + return 0; +} +early_param("nocoherentio", setnocoherentio); + static void __init plat_setup_iocoherency(void) { int supported = 0;
--
2.29.2