diff options
author | Jisheng Zhang <jszhang@kernel.org> | 2021-03-29 20:22:51 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-04-26 17:25:08 +0200 |
commit | de31ea4a1181a8bb4d32ab74f3434f2bc2b79122 (patch) | |
tree | e4122b22b93afded630aaa82c556a5d88f15b513 /arch/riscv/mm | |
parent | riscv: add __init section marker to some functions (diff) | |
download | linux-de31ea4a1181a8bb4d32ab74f3434f2bc2b79122.tar.xz linux-de31ea4a1181a8bb4d32ab74f3434f2bc2b79122.zip |
riscv: Mark some global variables __ro_after_init
All of these are never modified after init, so they can be
__ro_after_init.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/mm')
-rw-r--r-- | arch/riscv/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 3de7ec030342..9914ca0d789b 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -162,17 +162,17 @@ void __init setup_bootmem(void) } #ifdef CONFIG_MMU -static struct pt_alloc_ops pt_ops; +static struct pt_alloc_ops pt_ops __ro_after_init; /* Offset between linear mapping virtual address and kernel load address */ -unsigned long va_pa_offset; +unsigned long va_pa_offset __ro_after_init; EXPORT_SYMBOL(va_pa_offset); #ifdef CONFIG_64BIT /* Offset between kernel mapping virtual address and kernel load address */ unsigned long va_kernel_pa_offset; EXPORT_SYMBOL(va_kernel_pa_offset); #endif -unsigned long pfn_base; +unsigned long pfn_base __ro_after_init; EXPORT_SYMBOL(pfn_base); pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_bss; |