summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/extable.h
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2023-05-09 23:26:41 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2023-06-14 07:17:45 -0700
commitde658bcf03339561572e5dad3ec8ecedd1256747 (patch)
treeb6e96b384269f9f8ad4edadc9fc185d0695e4b5e /arch/riscv/include/asm/extable.h
parentc818fea83de4cdf5072c7cf00dd289fc9c6e1c68 (diff)
riscv: mm: stub extable related functions/macros for !MMU
extable relies on the MMU to work properly, so it's useless to include __ex_table sections and build extable related functions for !MMU case. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://lore.kernel.org/r/20230509152641.805-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include/asm/extable.h')
-rw-r--r--arch/riscv/include/asm/extable.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/extable.h b/arch/riscv/include/asm/extable.h
index 512012d193dc..3eb5c1f7bf34 100644
--- a/arch/riscv/include/asm/extable.h
+++ b/arch/riscv/include/asm/extable.h
@@ -32,7 +32,11 @@ do { \
(b)->data = (tmp).data; \
} while (0)
+#ifdef CONFIG_MMU
bool fixup_exception(struct pt_regs *regs);
+#else
+static inline bool fixup_exception(struct pt_regs *regs) { return false; }
+#endif
#if defined(CONFIG_BPF_JIT) && defined(CONFIG_ARCH_RV64I)
bool ex_handler_bpf(const struct exception_table_entry *ex, struct pt_regs *regs);