Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1343309rwl; Wed, 12 Apr 2023 11:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350a1f/Ve1LZ+QqtbaO8MZHnNFvGa+1kpNhlJESW4mV4m9DsfUl7gGHoZFPf9rA0sFU0/eTXx X-Received: by 2002:a17:906:a28f:b0:94e:46ef:1361 with SMTP id i15-20020a170906a28f00b0094e46ef1361mr4067353ejz.34.1681323609963; Wed, 12 Apr 2023 11:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681323609; cv=none; d=google.com; s=arc-20160816; b=BgO+SOJSQsD/InxSZL9vuBbvhae66fheSs84QSYTXs57pwA/BLNiYTFzxm+0sbtR0H uD3Afp19grxvWXIu3p8aWcRedJtaQg0GOEiGJBQX7xkGANlsnP6BNSmdE0/VFptrCS+T FqLSLdR0NpMQ+67yjgkjfEhJBdbPj5AO2QhuJ1U1Qp7dvs4O9nnS/HVukyx/J/gxblFQ DfB5ovWO3XYsf4nT6bjU0sHZ76xJv344BFT+PhzoIdcW57uk4CLvDSuZ0egruglaDvBA HfTR4I9ufYVmW93cC3Yz0WEtoIXCLm45+xvJDY7aEYse6ThuqummDPnAfGEM46v3cfcq H7Pg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=KkklAoZ5sichcefEnWnmhK55t3H/35XgHfcGvPD040o=; b=wNBmhakd9CC8tmZE4HFK/BSMkEP58qQwlMTxxpeFiyi79RjDNSWP2z1AJKgzmySoNI 6GNR5+VtFFLtErKG0B9G9S5w6U+WfUPGFdx+3Ey4Ufc+FvihloQfKsJrM6FW+BR+bvq2 IBI8MInB5QgwmpXIL7GS5Gstt/MxO39qyYRd+IBx2W7+wWKVXqF8WRVKRbPLhAahy7Gw BwwzLK8MLir88DZjorX4EHFA23beGUTOlC6hJ/RGOdIwgmGY7lNQVXHpMkW69FxL1ac0 ggVxQqZeDEH9DKCk1ss++vWTMmvxN5q57ka24iI6fOOA//nDgfANrbwr6e8O1ZkWRUU8 HOMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rnPYez3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 tj9-20020a170907c24900b0094ace7bc55fsi2621661ejc.1005.2023.04.12.11.19.39; Wed, 12 Apr 2023 11:20:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=rnPYez3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229906AbjDLSNF (ORCPT + 99 others); Wed, 12 Apr 2023 14:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjDLSNF (ORCPT ); Wed, 12 Apr 2023 14:13:05 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC0A5468E; Wed, 12 Apr 2023 11:13:03 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33CI8AmH026155; Wed, 12 Apr 2023 18:12:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=KkklAoZ5sichcefEnWnmhK55t3H/35XgHfcGvPD040o=; b=rnPYez3dQkaCq3gNPVY0vYfPSedkUiTUb/tIGjIf3HqfDxyWPFFBAWArnP2J6SdrmA2T yQP1OKwxvwVAW+eSy/+6i6nlOTCYglpOcXgpr3tVnmDe2n8ZzXE6dhE8ihb7xOUF673M pDlkM1R+uMpZ/s7i2z6+DtwivPgrn71/1/7M8gp/w9rsaoypMf/QCL9bbLDe6mmGLFpA bIDmLJ75gGRmtrTe0xUJRDY6MxN9nx+7k1RaC1JPzDeoT8PJbisE+3Wf1DNfVsvOmKyg m3I1gB+zCSGgRSdVd3g7dfUBMz5MJ5CMoVwhVyUuNCtR8sjZXwWUwAQ9fYV/2o2aMKvC pQ== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3px0aakgs4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:12:44 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33CH0HTI028286; Wed, 12 Apr 2023 18:12:42 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([9.208.129.119]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3pu0fr7hte-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:12:42 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33CICe7B36110764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Apr 2023 18:12:41 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B264E58055; Wed, 12 Apr 2023 18:12:40 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C14258043; Wed, 12 Apr 2023 18:12:40 +0000 (GMT) Received: from ltcden12-lp3.aus.stglabs.ibm.com (unknown [9.40.195.53]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Apr 2023 18:12:40 +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, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, ltcgcw@linux.vnet.ibm.com, dtsen@us.ibm.com, Danny Tsen Subject: [PATCH] Remove POWER10_CPU dependency and move PPC_MODULE_FEATURE_P10. Date: Wed, 12 Apr 2023 14:12:32 -0400 Message-Id: <20230412181232.2051-1-dtsen@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: M4MhzvZC9zJEw5_QZk-eAg2ul5lJwoVC X-Proofpoint-ORIG-GUID: M4MhzvZC9zJEw5_QZk-eAg2ul5lJwoVC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-12_08,2023-04-12_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxlogscore=758 clxscore=1011 mlxscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304120155 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TVD_SUBJ_WIPE_DEBT autolearn=no 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-kernel@vger.kernel.org Remove Power10 dependency in Kconfig and detect Power10 feature at runtime. Move PPC_MODULE_FEATURE_P10 definition to be in arch/powerpc/include/asm/cpufeature.h. Signed-off-by: Danny Tsen --- arch/powerpc/crypto/Kconfig | 2 +- arch/powerpc/crypto/aes-gcm-p10-glue.c | 1 - arch/powerpc/include/asm/cpufeature.h | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig index 1f8f02b494e1..7113f9355165 100644 --- a/arch/powerpc/crypto/Kconfig +++ b/arch/powerpc/crypto/Kconfig @@ -96,7 +96,7 @@ config CRYPTO_AES_PPC_SPE config CRYPTO_AES_GCM_P10 tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)" - depends on PPC64 && POWER10_CPU && CPU_LITTLE_ENDIAN + depends on PPC64 && CPU_LITTLE_ENDIAN select CRYPTO_LIB_AES select CRYPTO_ALGAPI select CRYPTO_AEAD diff --git a/arch/powerpc/crypto/aes-gcm-p10-glue.c b/arch/powerpc/crypto/aes-gcm-p10-glue.c index 1533c8cdd26f..bd3475f5348d 100644 --- a/arch/powerpc/crypto/aes-gcm-p10-glue.c +++ b/arch/powerpc/crypto/aes-gcm-p10-glue.c @@ -22,7 +22,6 @@ #include #include -#define PPC_MODULE_FEATURE_P10 (32 + ilog2(PPC_FEATURE2_ARCH_3_1)) #define PPC_ALIGN 16 #define GCM_IV_SIZE 12 diff --git a/arch/powerpc/include/asm/cpufeature.h b/arch/powerpc/include/asm/cpufeature.h index f6f790a90367..2dcc66225e7f 100644 --- a/arch/powerpc/include/asm/cpufeature.h +++ b/arch/powerpc/include/asm/cpufeature.h @@ -22,6 +22,7 @@ */ #define PPC_MODULE_FEATURE_VEC_CRYPTO (32 + ilog2(PPC_FEATURE2_VEC_CRYPTO)) +#define PPC_MODULE_FEATURE_P10 (32 + ilog2(PPC_FEATURE2_ARCH_3_1)) #define cpu_feature(x) (x) -- 2.31.1