diff options
author | Jisheng Zhang <jszhang@kernel.org> | 2021-05-16 15:15:56 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-05-29 22:51:16 +0200 |
commit | 010623568222bd144eb73aa9f3b46c79b63d7676 (patch) | |
tree | a18cd1e012d2511674e8c1a21af5820cfd6e7921 /arch/riscv/include | |
parent | riscv: Add __init section marker to some functions again (diff) | |
download | linux-010623568222bd144eb73aa9f3b46c79b63d7676.tar.xz linux-010623568222bd144eb73aa9f3b46c79b63d7676.zip |
riscv: mm: init: Consolidate vars, functions
Consolidate the following items in init.c
Staticize global vars as much as possible;
Add __initdata mark if the global var isn't needed after init
Add __init mark if the func isn't needed after init
Add __ro_after_init if the global var is read only after init
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/set_memory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h index 086f757e8ba3..9d4d455726d4 100644 --- a/arch/riscv/include/asm/set_memory.h +++ b/arch/riscv/include/asm/set_memory.h @@ -27,7 +27,7 @@ static inline int set_memory_rw_nx(unsigned long addr, int numpages) { return 0; #endif #if defined(CONFIG_64BIT) && defined(CONFIG_STRICT_KERNEL_RWX) -void protect_kernel_linear_mapping_text_rodata(void); +void __init protect_kernel_linear_mapping_text_rodata(void); #else static inline void protect_kernel_linear_mapping_text_rodata(void) {} #endif |