riscv: Add __init section marker to some functions again
PATCH 1/1 riscv: Add __init section marker to some functions again
From: Jisheng Zhang <[email protected]>
These functions are not needed after booting, so mark them as __init to move them to the __init section.
Signed-off-by Jisheng Zhang <[email protected]>
--- arch/riscv/kernel/cpufeature.c | 2 +- arch/riscv/mm/context.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/cpufeature.c +1 -1
@@ -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;
arch/riscv/mm/context.c +1 -1
@@ -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;
Signature · 1 line
2.31.0
Palmer Dabbelt
maintainerQuoted 29 lines · On Sun, 16 May 2021 05:59:42 PDT (-0700), [email protected] wrote:
From: Jisheng Zhang <[email protected]>
These functions are not needed after booting, so mark them as
__initto move them to the__initsection.Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/kernel/cpufeature.c | 2 +- arch/riscv/mm/context.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/riscv/kernel/cpufeature.c +1
-1@@ -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;arch/riscv/mm/context.c +0
-0
arch/riscv/mm/context.c static inline void set_mm(struct mm_struct *mm, unsigned int cpu) · line 218
Quoted 7 lines
arch/riscv/mm/context.c +1
-1@@ -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;
Thanks, this is on for-next.