summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/sbi.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/sbi.c
parent1987501b1130c6b4b7e1cef4b9c1dc9a8adae025 (diff)
downloadlinux-de31ea4a1181a8bb4d32ab74f3434f2bc2b79122.tar.gz
linux-de31ea4a1181a8bb4d32ab74f3434f2bc2b79122.tar.bz2
linux-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/sbi.c')
-rw-r--r--arch/riscv/kernel/sbi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/riscv/kernel/sbi.c b/arch/riscv/kernel/sbi.c
index fa0dd881fc5e..a404d648ef79 100644
--- a/arch/riscv/kernel/sbi.c
+++ b/arch/riscv/kernel/sbi.c
@@ -11,14 +11,14 @@
#include <asm/smp.h>
/* default SBI version is 0.1 */
-unsigned long sbi_spec_version = SBI_SPEC_VERSION_DEFAULT;
+unsigned long sbi_spec_version __ro_after_init = SBI_SPEC_VERSION_DEFAULT;
EXPORT_SYMBOL(sbi_spec_version);
-static void (*__sbi_set_timer)(uint64_t stime);
-static int (*__sbi_send_ipi)(const unsigned long *hart_mask);
+static void (*__sbi_set_timer)(uint64_t stime) __ro_after_init;
+static int (*__sbi_send_ipi)(const unsigned long *hart_mask) __ro_after_init;
static int (*__sbi_rfence)(int fid, const unsigned long *hart_mask,
unsigned long start, unsigned long size,
- unsigned long arg4, unsigned long arg5);
+ unsigned long arg4, unsigned long arg5) __ro_after_init;
struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
unsigned long arg1, unsigned long arg2,