From patchwork Fri Jan 5 18:49:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 13512493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ABF82C4707B for ; Fri, 5 Jan 2024 18:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+UD90Cj+//mVPpqBFOtAM4klafmw47lbMA7IDY2ZLBY=; b=Xfmx+p4DecH20o sDFq9nYpmUX7mK3Om7qyn+SRPwmzBF5t7D6ZFAJ16bK/WM1RBTJwsHXKUqR8eA3Hye6rdmUmDbiSo FEjCLj8w0Chg3Ze012GWz0A2F3EYm3Wqti4REt9B4l+6bWdr4pfu/6vdWiKJbt++h3ML01AgRjkRY ixzAjTjjm1d2sKxmGgMHv8O9N9D9cVDxFTf5GEVdk1ACvIdBDFNz32vauBOIF4JOxXEKkXCELVk9Q ztMmWLAade5s3WxA7avhIHQEh3koqVU7EAcMaKWuz2Rq5ZTB1FQScq82NxFXFUJZwrJrNtnnpBDfg /vMbIAvCQhirV22zID9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLpI9-0001LR-2e; Fri, 05 Jan 2024 18:51:37 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLpI4-0001HA-1t for linux-riscv@lists.infradead.org; Fri, 05 Jan 2024 18:51:34 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 4C833B81DE0; Fri, 5 Jan 2024 18:51:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E685BC433CA; Fri, 5 Jan 2024 18:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704480690; bh=4LDaa8miGX63GOCzm8SPiKzDeUQSHDxUGMUaV7Nkuco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cTa1zutJCWukyzqzyuanQKSovUh4HBqihXbjhXq6LzQsfHktSd3DYDpGpYNZWIpxW do0Gob3+/QHM0s2WwZ2SubopWtWICI9tqIGDpqIK5T0pckDc48TNlwS5Zxn7EPX6jJ YXCYS6/HzLzOjHLqZWbPHR1T/ZVWxEvea/RFjfCRY5w0iQRza1K6wcUMFmTxyBRz1J 0qt4m/OcPvxDBSsGmZiXCcl4/K3s/DP+8zqauCkKDLk7qFP60ZYM8RGPCy6O2pA1dd xf1dpsgLuhtSlTDYqBznOiZTFf64H3MuUxVVgmo/hed3Y2eaHcDA1jAJz4FHFF58fT I2uC5GkayCX9g== From: Eric Biggers To: linux-crypto@vger.kernel.org, linux-riscv@lists.infradead.org, Jerry Shih Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Heiko Stuebner , Phoebe Chen , hongrong.hsu@sifive.com, Paul Walmsley , Palmer Dabbelt , Albert Ou , Andy Chiu , Heiko Stuebner Subject: [PATCH v2 05/12] RISC-V: hook new crypto subdir into build-system Date: Fri, 5 Jan 2024 10:49:41 -0800 Message-ID: <20240105184950.43181-6-ebiggers@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240105184950.43181-1-ebiggers@kernel.org> References: <20240105184950.43181-1-ebiggers@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_105132_899649_AD77C91D X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner Create a crypto subdirectory for added accelerated cryptography routines and hook it into the riscv Kbuild and the main crypto Kconfig. Signed-off-by: Heiko Stuebner Reviewed-by: Eric Biggers Signed-off-by: Jerry Shih Signed-off-by: Eric Biggers --- arch/riscv/Kbuild | 1 + arch/riscv/crypto/Kconfig | 5 +++++ arch/riscv/crypto/Makefile | 4 ++++ crypto/Kconfig | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 arch/riscv/crypto/Kconfig create mode 100644 arch/riscv/crypto/Makefile diff --git a/arch/riscv/Kbuild b/arch/riscv/Kbuild index d25ad1c19f881..2c585f7a0b6ef 100644 --- a/arch/riscv/Kbuild +++ b/arch/riscv/Kbuild @@ -1,11 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-only obj-y += kernel/ mm/ net/ obj-$(CONFIG_BUILTIN_DTB) += boot/dts/ +obj-$(CONFIG_CRYPTO) += crypto/ obj-y += errata/ obj-$(CONFIG_KVM) += kvm/ obj-$(CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY) += purgatory/ # for cleaning subdir- += boot diff --git a/arch/riscv/crypto/Kconfig b/arch/riscv/crypto/Kconfig new file mode 100644 index 0000000000000..10d60edc0110a --- /dev/null +++ b/arch/riscv/crypto/Kconfig @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + +menu "Accelerated Cryptographic Algorithms for CPU (riscv)" + +endmenu diff --git a/arch/riscv/crypto/Makefile b/arch/riscv/crypto/Makefile new file mode 100644 index 0000000000000..b3b6332c9f6d0 --- /dev/null +++ b/arch/riscv/crypto/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# linux/arch/riscv/crypto/Makefile +# diff --git a/crypto/Kconfig b/crypto/Kconfig index 70661f58ee41c..c8fd2b83e589b 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1512,20 +1512,23 @@ source "arch/arm64/crypto/Kconfig" endif if LOONGARCH source "arch/loongarch/crypto/Kconfig" endif if MIPS source "arch/mips/crypto/Kconfig" endif if PPC source "arch/powerpc/crypto/Kconfig" endif +if RISCV +source "arch/riscv/crypto/Kconfig" +endif if S390 source "arch/s390/crypto/Kconfig" endif if SPARC source "arch/sparc/crypto/Kconfig" endif if X86 source "arch/x86/crypto/Kconfig" endif endif