riscv: mm: init: mark satp_mode __ro_after_init
authorJisheng Zhang <jszhang@kernel.org>
Tue, 25 Jan 2022 16:00:12 +0000 (00:00 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 14 Feb 2022 23:41:41 +0000 (15:41 -0800)
satp_mode is never modified after init, so it can be marked as
__ro_after_init.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c

index cf4d018..332a319 100644 (file)
@@ -38,9 +38,9 @@ EXPORT_SYMBOL(kernel_map);
 #endif
 
 #ifdef CONFIG_64BIT
-u64 satp_mode = !IS_ENABLED(CONFIG_XIP_KERNEL) ? SATP_MODE_48 : SATP_MODE_39;
+u64 satp_mode __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL) ? SATP_MODE_48 : SATP_MODE_39;
 #else
-u64 satp_mode = SATP_MODE_32;
+u64 satp_mode __ro_after_init = SATP_MODE_32;
 #endif
 EXPORT_SYMBOL(satp_mode);