Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2015250rwb; Wed, 30 Nov 2022 00:47:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf74xvVwFGCYHSw1rAkShfI0Fp1qgIBA9y2CeSInGdQMIwlTwXUk0sd8MGH8kjwjrYkAFPLH X-Received: by 2002:a05:6402:1f85:b0:462:2410:9720 with SMTP id c5-20020a0564021f8500b0046224109720mr10834496edc.84.1669798071654; Wed, 30 Nov 2022 00:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669798071; cv=none; d=google.com; s=arc-20160816; b=ohE6ihgX6PohCcMEX2CDNGo8XoJxvmqNZ5ebtzL0khwa/wJx2g3boouHxNGrS05sBO v1b7eMlj5Dnu4a29b5+CRSYgw9Dr4L8qo8u+w5/5X9yM7idlXkTUkSzVR5yelgZnKt3o 7TSNldN8tiqb4lXn1At4pnUtQbaPHwzJcMeaEB0X4djhqwqOv/orTcYPHYD+LGAm5EGd f9RLIhlC/eX8n5lbdTii52t3RMCsEN5pL/mjCX39BzBzNlzdq+4vuSDCNxp9Lnorxcow gj/dGLmlGc5TqVGdHycdadhOteL840tep7gdyQtLLPGIgqWmN6ChdUtQufUfa2Kw9sZk zzLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DDN8rVl+bpX39wsMmtBu4zAD3/8mE0dKx+jGxLGVP0k=; b=JF9damyM6YFQbR+UPm2UaiskUSg7CP+f1bfc+UCcELf4N+uKxxKaNTzZMMpNdctOMH gRz6oKUpjEG2TP8rHNMsY1oTemHRHxEtHeoAwZa9T7olIqKQKgIn0fJweSXbSAz4Re6G WHHrtnBlqdOOb0Z2Jy5B5YhabT4hVNxdLFw5r9GRctnfGlonrQsuFPdXTQw0RWdlMflC Q17NIpDXeCs02gCiFyemVkgQKW/qT2IG1HUtVlcemKDExzAP5J2BeiUywpH7cHg5q/pq pHSV/3zic2KC+2nOFdLSIDDMP5oj/6ZXw4aHz4WPxxanylGmTFv/Z1a8nUbUzfH13CcK pCug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZZftfc+a; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz13-20020a0564021d4d00b0045cba2d74c3si760791edb.541.2022.11.30.00.47.28; Wed, 30 Nov 2022 00:47:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZZftfc+a; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236835AbiK3In6 (ORCPT + 99 others); Wed, 30 Nov 2022 03:43:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236543AbiK3Inx (ORCPT ); Wed, 30 Nov 2022 03:43:53 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7BC2FA63; Wed, 30 Nov 2022 00:43:35 -0800 (PST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AU712l4010904; Wed, 30 Nov 2022 08:42:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=DDN8rVl+bpX39wsMmtBu4zAD3/8mE0dKx+jGxLGVP0k=; b=ZZftfc+aiEHAJSiLyjzARB1Gd2VcOmSyuCeT0VUk3MqlP7G+JZTDAnYpw5SBoFhe8DqS qQceHcpNJRGoN+AEcsu9rPTXTB9FX/QopNKuLWVQ4gBtN8Y7eVScueEOwwEKuR/TBRYx T6rKbISrLOwRMHePNKd2M6XjVvoCUfeZemta3TnQyu/nDZ3Np8C6bL7s8Gp5OQYnnBHI nWInd2ux62e9zXCwdKq9Wc6xCCsCYIm1/W8GfBPe6qsp6iwJMJLAJgRbM//FjaOOpFWm ZEpQf6IwBRb+4xjCYSfPhKEDGyAisC+2MQciSJt8shkrrcnrjWiJyDKxZwsra7XqYwUn wg== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m60a651a8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Nov 2022 08:42:25 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AU8ZKSQ019258; Wed, 30 Nov 2022 08:42:24 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04wdc.us.ibm.com with ESMTP id 3m3ae9tqa7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Nov 2022 08:42:24 +0000 Received: from smtpav06.wdc07v.mail.ibm.com ([9.208.128.115]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AU8gNUA2556498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Nov 2022 08:42:24 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 468195806D; Wed, 30 Nov 2022 08:42:23 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1D575805A; Wed, 30 Nov 2022 08:42:22 +0000 (GMT) Received: from ltcden12-lp3.aus.stglabs.ibm.com (unknown [9.40.195.53]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 30 Nov 2022 08:42:22 +0000 (GMT) From: Danny Tsen To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, leitao@debian.org, nayna@linux.ibm.com, appro@cryptogams.org, linux-kernel@vger.kernel.org, ltcgcw@linux.vnet.ibm.com, dtsen@linux.ibm.com Subject: [RESEND PATCH 1/6] Update Kconfig and Makefile. Date: Wed, 30 Nov 2022 03:42:06 -0500 Message-Id: <20221130084211.48154-2-dtsen@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221130084211.48154-1-dtsen@linux.ibm.com> References: <20221130084211.48154-1-dtsen@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: l_8qFcVEyAtFDNqWFuBRTNy41Gv5-NLw X-Proofpoint-GUID: l_8qFcVEyAtFDNqWFuBRTNy41Gv5-NLw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-30_04,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 phishscore=0 impostorscore=0 clxscore=1015 suspectscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211300062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Defined CRYPTO_P10_AES_GCM in Kconfig to support AES/GCM stitched implementation for Power10+ CPU. Added a new module driver p10-aes-gcm-crypto. Signed-off-by: Danny Tsen --- arch/powerpc/crypto/Kconfig | 11 +++++++++++ arch/powerpc/crypto/Makefile | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig index c1b964447401..db7d99383993 100644 --- a/arch/powerpc/crypto/Kconfig +++ b/arch/powerpc/crypto/Kconfig @@ -94,4 +94,15 @@ config CRYPTO_AES_PPC_SPE architecture specific assembler implementations that work on 1KB tables or 256 bytes S-boxes. +config CRYPTO_P10_AES_GCM + tristate "Stitched AES/GCM acceleration support on P10+ CPU (PPC)" + depends on PPC64 + select CRYPTO_LIB_AES + select CRYPTO_ALGAPI + select CRYPTO_AEAD + default m + help + Support for cryptographic acceleration instructions on Power10+ CPU. + This module supports stitched acceleration for AES/GCM in hardware. + endmenu diff --git a/arch/powerpc/crypto/Makefile b/arch/powerpc/crypto/Makefile index 4808d97fede5..5b8252013abd 100644 --- a/arch/powerpc/crypto/Makefile +++ b/arch/powerpc/crypto/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o obj-$(CONFIG_CRYPTO_CRC32C_VPMSUM) += crc32c-vpmsum.o obj-$(CONFIG_CRYPTO_CRCT10DIF_VPMSUM) += crct10dif-vpmsum.o obj-$(CONFIG_CRYPTO_VPMSUM_TESTER) += crc-vpmsum_test.o +obj-$(CONFIG_CRYPTO_P10_AES_GCM) += p10-aes-gcm-crypto.o aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-spe-glue.o md5-ppc-y := md5-asm.o md5-glue.o @@ -21,3 +22,12 @@ sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o crc32c-vpmsum-y := crc32c-vpmsum_asm.o crc32c-vpmsum_glue.o crct10dif-vpmsum-y := crct10dif-vpmsum_asm.o crct10dif-vpmsum_glue.o +p10-aes-gcm-crypto-y := p10-aes-gcm-glue.o p10_aes_gcm.o ghashp8-ppc.o aesp8-ppc.o + +quiet_cmd_perl = PERL $@ + cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64) > $@ + +targets += aesp8-ppc.S ghashp8-ppc.S + +$(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE + $(call if_changed,perl) -- 2.31.1