summaryrefslogtreecommitdiff
path: root/arch/riscv/mm/init.c
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2022-01-26 00:00:12 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-02-14 15:41:41 -0800
commit67ff2f262619d7bb5101525672ead4f2a437a40f (patch)
treedd6297dece84ddcd03c18722f2dddc82fbd84883 /arch/riscv/mm/init.c
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff)
downloadlwn-67ff2f262619d7bb5101525672ead4f2a437a40f.tar.gz
lwn-67ff2f262619d7bb5101525672ead4f2a437a40f.zip
riscv: mm: init: mark satp_mode __ro_after_init
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>
Diffstat (limited to 'arch/riscv/mm/init.c')
-rw-r--r--arch/riscv/mm/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index cf4d018b7d66..332a31978381 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -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);