riscv: Add __init section marker to some functions again
authorJisheng Zhang <jszhang@kernel.org>
Sun, 16 May 2021 12:59:42 +0000 (20:59 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 29 May 2021 20:39:27 +0000 (13:39 -0700)
These functions are not needed after booting, so mark them as __init
to move them to the __init section.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/cpufeature.c
arch/riscv/mm/context.c

index a2848dc..d959d20 100644 (file)
@@ -59,7 +59,7 @@ bool __riscv_isa_extension_available(const unsigned long *isa_bitmap, int bit)
 }
 EXPORT_SYMBOL_GPL(__riscv_isa_extension_available);
 
-void riscv_fill_hwcap(void)
+void __init riscv_fill_hwcap(void)
 {
        struct device_node *node;
        const char *isa;
index 83e7ae3..9bc46ab 100644 (file)
@@ -213,7 +213,7 @@ static inline void set_mm(struct mm_struct *mm, unsigned int cpu)
                set_mm_noasid(mm);
 }
 
-static int asids_init(void)
+static int __init asids_init(void)
 {
        unsigned long old;