summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/extable.h
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-11-18 19:23:21 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-01-05 17:52:24 -0800
commitc07935cb3ccf37acc5df079074ba20a720716f7a (patch)
treebd9627a688e9b6ea08d4ec2d14596142ef8cfc7c /arch/riscv/include/asm/extable.h
parentbb1f85d6046f0db757ac52ed60a5eba5df394819 (diff)
riscv: bpf: move rv_bpf_fixup_exception signature to extable.h
This is to group riscv related extable related functions signature into one file. Signed-off-by: Jisheng Zhang <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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/extable.h b/arch/riscv/include/asm/extable.h
index 84760392fc69..c48c020fcf4d 100644
--- a/arch/riscv/include/asm/extable.h
+++ b/arch/riscv/include/asm/extable.h
@@ -22,4 +22,16 @@ struct exception_table_entry {
#define ARCH_HAS_RELATIVE_EXTABLE
int fixup_exception(struct pt_regs *regs);
+
+#if defined(CONFIG_BPF_JIT) && defined(CONFIG_ARCH_RV64I)
+int rv_bpf_fixup_exception(const struct exception_table_entry *ex, struct pt_regs *regs);
+#else
+static inline int
+rv_bpf_fixup_exception(const struct exception_table_entry *ex,
+ struct pt_regs *regs)
+{
+ return 0;
+}
+#endif
+
#endif