aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/alternative.c
diff options
context:
space:
mode:
authorEvan Green <evan@rivosinc.com>2023-04-20 12:49:34 -0700
committerPalmer Dabbelt <palmer@rivosinc.com>2023-04-25 21:58:42 -0700
commitbb3f89487fd936df7cc5165bae37ca2669056c5c (patch)
tree0e2434e119b6f337dd14785728071b490a20f8dd /arch/riscv/kernel/alternative.c
parent310c33dc7a1278d80ba717b9964bd478d52681e0 (diff)
RISC-V: hwprobe: Remove __init on probe_vendor_features()
probe_vendor_features() is now called from smp_callin(), which is not __init code and runs during cpu hotplug events. Remove the __init_or_module decoration from it and the functions it calls to avoid walking into outer space. Fixes: 62a31d6e38bd ("RISC-V: hwprobe: Support probing of misaligned access performance") Signed-off-by: Evan Green <evan@rivosinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230420194934.1871356-1-evan@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/alternative.c')
-rw-r--r--arch/riscv/kernel/alternative.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/alternative.c b/arch/riscv/kernel/alternative.c
index fc65c9293ac5..6b75788c18e6 100644
--- a/arch/riscv/kernel/alternative.c
+++ b/arch/riscv/kernel/alternative.c
@@ -31,7 +31,7 @@ struct cpu_manufacturer_info_t {
unsigned long impid);
};
-static void __init_or_module riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_info)
+static void riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_info)
{
#ifdef CONFIG_RISCV_M_MODE
cpu_mfr_info->vendor_id = csr_read(CSR_MVENDORID);
@@ -144,7 +144,7 @@ void riscv_alternative_fix_offsets(void *alt_ptr, unsigned int len,
}
/* Called on each CPU as it starts */
-void __init_or_module probe_vendor_features(unsigned int cpu)
+void probe_vendor_features(unsigned int cpu)
{
struct cpu_manufacturer_info_t cpu_mfr_info;