aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/smp.c
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-03-30 02:22:51 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-26 08:25:08 -0700
commitde31ea4a1181a8bb4d32ab74f3434f2bc2b79122 (patch)
treee4122b22b93afded630aaa82c556a5d88f15b513 /arch/riscv/kernel/smp.c
parentriscv: add __init section marker to some functions (diff)
downloadlinux-dev-de31ea4a1181a8bb4d32ab74f3434f2bc2b79122.tar.xz
linux-dev-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/kernel/smp.c')
-rw-r--r--arch/riscv/kernel/smp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index 8325d33411d8..476e2e4bc5c5 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -32,7 +32,7 @@ enum ipi_message_type {
IPI_MAX
};
-unsigned long __cpuid_to_hartid_map[NR_CPUS] = {
+unsigned long __cpuid_to_hartid_map[NR_CPUS] __ro_after_init = {
[0 ... NR_CPUS-1] = INVALID_HARTID
};
@@ -87,7 +87,7 @@ static void ipi_stop(void)
wait_for_interrupt();
}
-static struct riscv_ipi_ops *ipi_ops;
+static struct riscv_ipi_ops *ipi_ops __ro_after_init;
void riscv_set_ipi_ops(struct riscv_ipi_ops *ops)
{