From: Jisheng Zhang Date: Wed, 14 Jun 2023 16:55:04 +0000 (+0800) Subject: riscv: mm: mark noncoherent_supported as __ro_after_init X-Git-Tag: v6.5-rc1~25^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8500808a991f0e569b3d835a6223848c0717a6c7;p=tomoyo%2Ftomoyo-test1.git riscv: mm: mark noncoherent_supported as __ro_after_init The noncoherent_supported indicates whether the HW is coherent or not, it won't change after booting, mark it as __ro_after_init. Signed-off-by: Jisheng Zhang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230614165504.532-4-jszhang@kernel.org Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/mm/dma-noncoherent.c b/arch/riscv/mm/dma-noncoherent.c index d919efab6eba..d51a75864e53 100644 --- a/arch/riscv/mm/dma-noncoherent.c +++ b/arch/riscv/mm/dma-noncoherent.c @@ -10,7 +10,7 @@ #include #include -static bool noncoherent_supported; +static bool noncoherent_supported __ro_after_init; void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, enum dma_data_direction dir)