From: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= Subject: [RFC PATCH 2/3] riscv: add build infra for JIT compiler Date: Tue, 15 Jan 2019 09:35:17 +0100 Message-ID: <20190115083518.10149-3-bjorn.topel@gmail.com> References: <20190115083518.10149-1-bjorn.topel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , daniel@iogearbox.net, palmer@sifive.com, davidlee@sifive.com, netdev@vger.kernel.org To: linux-riscv@lists.infradead.org Return-path: Received: from mail-lf1-f66.google.com ([209.85.167.66]:38712 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfAOIgA (ORCPT ); Tue, 15 Jan 2019 03:36:00 -0500 Received: by mail-lf1-f66.google.com with SMTP id a8so1368917lfk.5 for ; Tue, 15 Jan 2019 00:35:58 -0800 (PST) In-Reply-To: <20190115083518.10149-1-bjorn.topel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Signed-off-by: Björn Töpel --- 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