[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190115083518.10149-3-bjorn.topel@gmail.com>
Date: Tue, 15 Jan 2019 09:35:17 +0100
From: Björn Töpel <bjorn.topel@...il.com>
To: linux-riscv@...ts.infradead.org
Cc: Björn Töpel <bjorn.topel@...il.com>,
daniel@...earbox.net, palmer@...ive.com, davidlee@...ive.com,
netdev@...r.kernel.org
Subject: [RFC PATCH 2/3] riscv: add build infra for JIT compiler
Signed-off-by: Björn Töpel <bjorn.topel@...il.com>
---
arch/riscv/Kconfig | 1 +
arch/riscv/Makefile | 4 ++++
arch/riscv/net/Makefile | 5 +++++
arch/riscv/net/bpf_jit_comp.c | 4 ++++
4 files changed, 14 insertions(+)
create mode 100644 arch/riscv/net/Makefile
create mode 100644 arch/riscv/net/bpf_jit_comp.c
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f13220904d7c..3edaa5958262 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -50,6 +50,7 @@ config RISCV
select GENERIC_IRQ_MULTI_HANDLER
select ARCH_HAS_PTE_SPECIAL
select HAVE_EFFICIENT_UNALIGNED_ACCESS
+ select HAVE_EBPF_JIT if 64BIT
config MMU
def_bool y
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 4b594f2e4f7e..ad487f3c1d7b 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -79,6 +79,10 @@ head-y := arch/riscv/kernel/head.o
core-y += arch/riscv/kernel/ arch/riscv/mm/
+ifeq ($(CONFIG_ARCH_RV64I),y)
+core-y += arch/riscv/net/
+endif
+
libs-y += arch/riscv/lib/
PHONY += vdso_install
diff --git a/arch/riscv/net/Makefile b/arch/riscv/net/Makefile
new file mode 100644
index 000000000000..b0b6ac13edf5
--- /dev/null
+++ b/arch/riscv/net/Makefile
@@ -0,0 +1,5 @@
+#
+# RISCV networking code
+#
+
+obj-$(CONFIG_BPF_JIT) += bpf_jit_comp.o
diff --git a/arch/riscv/net/bpf_jit_comp.c b/arch/riscv/net/bpf_jit_comp.c
new file mode 100644
index 000000000000..7e359d3249ee
--- /dev/null
+++ b/arch/riscv/net/bpf_jit_comp.c
@@ -0,0 +1,4 @@
+struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
+{
+ return prog;
+}
--
2.19.1
Powered by blists - more mailing lists