From patchwork Mon Jan 22 00:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 189864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2295163dyb; Sun, 21 Jan 2024 16:24:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeNSAj8SR3EH9/0uNdud+0zSd2dNTxGQhvF4BsrzT8k4IVP9bwveZHLivG4kJywrRUpJN4 X-Received: by 2002:a05:6402:2022:b0:55b:fda0:4f5d with SMTP id ay2-20020a056402202200b0055bfda04f5dmr634557edb.97.1705883060102; Sun, 21 Jan 2024 16:24:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705883060; cv=pass; d=google.com; s=arc-20160816; b=x05AKeojxok2+PNt+3m9qsF4YjbGd4kkRMn3vENhgX66/5U7dRT0kNYSf4+ZcUFk7L /v6XV2O8v71gch5d47sYiFYOl6Wv6rQz/fQbg+OIXmcrirhwISjyydK+f+bhaiqQZaqs RlWGhTSZ3vKyGCKBEw3iyJ6/zjxAHf/ArCK0anPcPC3v/VivmQhJrT3s+pC+FCro3jta IjQWCcDOXTfhDW2Ar8rIrFq3LyF2LTQFGa73gJf06LMZvregP4sbPmuV5w7TuT/u2eo+ IlJ4922HuNP0fAHqrSo8oPaOrW5FTZLtFJE3Jz2JNLvJTG9eS3w26c9bmO4cdDW/b9k0 eHiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WM21cpS1+49jrNURigCL8Pta0M7yLfxDB5jJfL7Cn9A=; fh=gyibMVRMMHot5utPiR7aeWZkR96ebFgyaWxYaKfV2b8=; b=o5U55REQkYmA3rWQNysejBE8EhfkPZr2zUZqpUVb0Dtaw4x8SRAsluZNOgBvfctBXj 3YdZNY17oXkXhj2uio6MTMcUYo94Weaoh3CZqOmobVM7rz2PKRGU6upVzjWxGE6XCmuY 7jO5i2cOMwEOKNcK3xT9OR2uIM6bYoPxSaQabQIBmwcNRh06OmXtW7aaJ9qZZW/sx9nK Vh5BnLUINrsANVGE68eHSqqKqU1YP0DWoonHLRutg6zhqsXSMsZTLpLLwv4jqmLjFa6M VtWkB+cyKS0T/PVNiX0BJxfBjLoxfx3PgAy8Yry3FD7ABQa7r60Uuuv/IpIbAhQmya6G 8yJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXmmw0pF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32235-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32235-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t34-20020a056402242200b00557ddbec291si10882359eda.46.2024.01.21.16.24.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 16:24:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32235-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXmmw0pF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32235-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32235-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B947E1F21770 for ; Mon, 22 Jan 2024 00:24:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AF925227; Mon, 22 Jan 2024 00:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oXmmw0pF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBA75A2A; Mon, 22 Jan 2024 00:22:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705882979; cv=none; b=XhSvMvvLrC8Jd4LNc+DErlN5/X3yYeGUja2Qx5IHiDTIuWV0H7lmSUewZ1gn+b85NzaGlB4DyWSf5hyjGJleUPDtY/3nfnc6IB6TOqko0YwUj75sj5taJc07BpQEYpwxMbZ6VyU6+E76bEKUQ82rIW0hRNhgnMaqiH6va/pLC2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705882979; c=relaxed/simple; bh=TfofIEIKQZPK62dMUzgvPsR4BgvnYH75rA2YkgLkUvQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jQKbO4LRaW7p06NSPmtPek+0Ku6ChON1v2Qoz4pyPJrZhN5K6qfoyj39BQfkzqFVLaJVZ2QXOSs8Rn5d3gCahMjMw6udTWDpJWUcNmknUDxlkq4/AJZm5SDXS/4CdPzlEQTqiGrHuFTk1nNlZNILhkU2j8bEh9ZQhlIy9b7eD/E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oXmmw0pF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14B7AC43330; Mon, 22 Jan 2024 00:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705882979; bh=TfofIEIKQZPK62dMUzgvPsR4BgvnYH75rA2YkgLkUvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oXmmw0pFKie1iTNEGrk1apBcAwNl0xXWYevupFo5OY/FbDJ0gEe1eAwyHLzA7rYHQ VakSJ8WYLUyqbNKoG43mlsAbgUEmIi+4L7MOfvsXzbw+goo9lUw9srnKTF3WWZxAcx 5Kyk99bwbmRl0u1P9xi/Ckm6NM+xWGQ9wtW1LiUTcljq2RWn1wE0siEwMuLGMSZ+AB uo/A4Mrgrlw8bHIKJEHwlxCGbeCTMJGN+crODJ/aydsCP2MQ3zIsOOLdjwJwr3iXG/ pf01EyzlGraH+P21AEXDaXGIhX99/gvlUl76GOOYaFAnYzf2O/awfYJ/4utJVT9X4Q K/yt9e5HaL7hA== From: Eric Biggers To: linux-crypto@vger.kernel.org, linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Albert Ou , Andy Chiu , Ard Biesheuvel , =?utf-8?q?Christoph_M=C3=BCllner?= , Heiko Stuebner , Jerry Shih , Palmer Dabbelt , Paul Walmsley , Phoebe Chen , hongrong.hsu@sifive.com, Heiko Stuebner Subject: [PATCH v3 03/10] RISC-V: hook new crypto subdir into build-system Date: Sun, 21 Jan 2024 16:19:14 -0800 Message-ID: <20240122002024.27477-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122002024.27477-1-ebiggers@kernel.org> References: <20240122002024.27477-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788748035665519192 X-GMAIL-MSGID: 1788748035665519192 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 | 1 + crypto/Kconfig | 3 +++ 4 files changed, 10 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..a4e40e534e6a8 --- /dev/null +++ b/arch/riscv/crypto/Makefile @@ -0,0 +1 @@ +# SPDX-License-Identifier: GPL-2.0-only diff --git a/crypto/Kconfig b/crypto/Kconfig index 7d156c75f15f2..00e4aa16bf2bf 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1489,20 +1489,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