Skip to content

Commit

Permalink
riscv: mm: init: mark satp_mode __ro_after_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jisheng Zhang authored and Palmer Dabbelt committed Feb 14, 2022
1 parent e783362 commit 67ff2f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 67ff2f2

Please sign in to comment.