From patchwork Tue Jan 15 08:35:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 10764091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CA5713A4 for ; Tue, 15 Jan 2019 08:36:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D2302B502 for ; Tue, 15 Jan 2019 08:36:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 816C42B562; Tue, 15 Jan 2019 08:36:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 34D712B502 for ; Tue, 15 Jan 2019 08:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+MoFkbkRdJt5mQy/4Z5V3y4LZYla6QvHnXqh0K6bzxY=; b=U91FuHOeVnI3ca 0AFPplskboiYh/kqY4COPwOrmgsPluyaq5fuDhtwMtxNfLFNcj+7IlA2pv1tJpb0YocO7gUDdtifL Hf+on/d22fxfuy0qEfBPspy9k/A2Pj73AiSNgAj3ymLNfjs+6SRtHHNY4V2BSyRwtbF8T+0v0nMKA Hsv1Rw5ucOcdMg1ccepsSQ0BCo5iRod+wS6bTvX4YXVJdddlYOSf33WuXFPD+maPBAVLZomJraYF0 8JAjo3/vZffo8P7ijbUg1Gq9ZYGVk2nLcBktvOQVE+mzxtHBherJB1iyl+84YZ9FGGFl3e5tSVVs9 cb0y5GcYLoQL1yecJLKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjKCZ-0002wK-22; Tue, 15 Jan 2019 08:36:03 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjKCX-0002uT-2h for linux-riscv@lists.infradead.org; Tue, 15 Jan 2019 08:36:02 +0000 Received: by mail-lf1-x144.google.com with SMTP id a16so1382312lfg.3 for ; Tue, 15 Jan 2019 00:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6kspacMDlawfH674vGJhb7OwBVwVwcUr6YFmb9U7sq0=; b=iDz3+RNJDFy+gHfZA81+dSJ8MsK/pr/vqwryT8w+yEaDXyM7UBv7VqYCE5Ka+qDV/N WfPj4HxStbcD7r3DDpeh3Yh5ODZHw0HtgiL/RRRBY5B1qcmjck9pShtq2nDkdprOf6j6 sExYlm1v9GsFWV9gZGbCudUT8bIYFaSRmtCUqhAVbEqsinZqz4QolTfNnVfDoGy4jE5G oP9prqGBdTPajdKUQTDZP7wUAGi/RMy/nCHU+tFitX135/9qbGNTvixTomrBVhgnUvnT B4efZ9fSYrjcEb2Mp3nRDlWi0TaSiQG17bOS8r54MqCizXcDWiP5Va1HUpPMwfh+CJ2T L87w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6kspacMDlawfH674vGJhb7OwBVwVwcUr6YFmb9U7sq0=; b=axbmDMjSXxnc1kd1G/RkwzKi1ND63S8OKmZ4S8PYig4IGGW6vvM385y7olTm4KlfQP tw/pdosAuZZTMKbhjA9GEP/fdsx8UJoW8lnyyq7BMXJ3mYuv9jcthIsTr4H6aXgswLf+ MMZ5Zb8pcMWIzynYdDfu5YrGX+nYIbvDe8nidPRzZje79vROfoKs4xHqBGbp2LIJxeUJ 9kOGBe9uR3LwkDVjYBwkWjfnu3RZPv4m+5r+X1Fmu17CT/cjuXowfTbYmYJ0nzPjZhi3 OOXFsMOqkgYJE1QWIzrSuwmtMsty1nuOcB/geIESS+A7v8KPfojjYT6WjMfcBXeoJD5W QzwQ== X-Gm-Message-State: AJcUukeU8BQs9v7f9W6MQtklOChbp2HFm4Uon7DiCzkzVEO4eCEDOWpV StkVSlY4ZtjkJj3y3xpCbBzTI3gozB9xfA== X-Google-Smtp-Source: ALg8bN5HEQFAWXvsQsiVirXn3vol7dXm1Otd1w7t+75eLgi8AEm/5fWsdz9kAszHhBQHb/v7LpOSPg== X-Received: by 2002:a19:d90c:: with SMTP id q12mr1903077lfg.24.1547541357847; Tue, 15 Jan 2019 00:35:57 -0800 (PST) Received: from btopel-mobl.ger.intel.com ([213.100.199.124]) by smtp.gmail.com with ESMTPSA id e14-v6sm453004ljb.31.2019.01.15.00.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 00:35:57 -0800 (PST) From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: linux-riscv@lists.infradead.org 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> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190115083518.10149-1-bjorn.topel@gmail.com> References: <20190115083518.10149-1-bjorn.topel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190115_003601_117474_6E04D5EC X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , palmer@sifive.com, davidlee@sifive.com, daniel@iogearbox.net, netdev@vger.kernel.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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; +}