Skip to content

Commit 8500808

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
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 <jszhang@kernel.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230614165504.532-4-jszhang@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 3b472f8 commit 8500808

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/riscv/mm/dma-noncoherent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <linux/mm.h>
1111
#include <asm/cacheflush.h>
1212

13-
static bool noncoherent_supported;
13+
static bool noncoherent_supported __ro_after_init;
1414

1515
void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
1616
enum dma_data_direction dir)

0 commit comments

Comments
 (0)