summaryrefslogtreecommitdiff
path: root/arch/riscv/net/Makefile
diff options
context:
space:
mode:
authorLuke Nelson <lukenels@cs.washington.edu>2020-03-04 21:02:04 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-05 16:13:47 +0100
commitca6cb5447ceca6a87d6b62c9e5d41042c34f7ffa (patch)
tree85a27cd2f9fcdaa06a2d508bba75d91539bad684 /arch/riscv/net/Makefile
parent9ce6010290587f4b0c57e2819481bd5ba9668349 (diff)
riscv, bpf: Factor common RISC-V JIT code
This patch factors out code that can be used by both the RV64 and RV32 BPF JITs to a common bpf_jit.h and bpf_jit_core.c. Move struct definitions and macro-like functions to header. Rename rv_sb_insn/rv_uj_insn to rv_b_insn/rv_j_insn to match the RISC-V specification. Move reusable functions emit_body() and bpf_int_jit_compile() to bpf_jit_core.c with minor simplifications. Rename emit_insn() and build_{prologue,epilogue}() to be prefixed with "bpf_jit_" as they are no longer static. Rename bpf_jit_comp.c to bpf_jit_comp64.c to be more explicit. Co-developed-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Luke Nelson <luke.r.nels@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Björn Töpel <bjorn.topel@gmail.com> Acked-by: Björn Töpel <bjorn.topel@gmail.com> Link: https://lore.kernel.org/bpf/20200305050207.4159-2-luke.r.nels@gmail.com
Diffstat (limited to 'arch/riscv/net/Makefile')
-rw-r--r--arch/riscv/net/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/net/Makefile b/arch/riscv/net/Makefile
index ec5b14763316..018074dbf986 100644
--- a/arch/riscv/net/Makefile
+++ b/arch/riscv/net/Makefile
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_BPF_JIT) += bpf_jit_comp.o
+
+obj-$(CONFIG_BPF_JIT) += bpf_jit_core.o bpf_jit_comp64.o