Message ID | ZGwmAp5RPqAjVMCg@gondor.apana.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1855202vqo; Mon, 22 May 2023 19:56:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yc1B9Upg6x/GfI+TeuxHfl7s2HHwZdP8bSF7FZxAbyH3mW43LNYvP4eqm51yNYz4URe/C X-Received: by 2002:a05:6a20:8e15:b0:104:3877:b5a3 with SMTP id y21-20020a056a208e1500b001043877b5a3mr13946877pzj.14.1684810609525; Mon, 22 May 2023 19:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684810609; cv=none; d=google.com; s=arc-20160816; b=ui3H69DDxJQDSMgoIppYiIOS54Zu6YGcqJC08C7d5fk89AiEJTAKlT173GmRQ6NqOM yaRAxy3oESRDZuGUrOm+aIlw2cotZdAa3v+XcBd0OQKS+4jkcN1PxJvVnP4IP0nTtMoW JPZQUCOKFVRdcQqXOX8YareU75Xdb+U5OUTYdQcptiz+lyymG93JfPnymqQn0f35zx8J xMxPdv9c9xrmZNdtevOLiXR8d/YGQdOmp8a8DitvwXlLksVVAo3XN2/1TZdYOKKG7VLd fy4oxVngMM+aDKtnMs5OqiFQqO9MhCg09tHBz6x1A+oVp1O58/slTzTSHFxDaWogUrWJ 0Y8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=XRT4HcqdgbgGFthyNnmxrdDmTFUoKsF9VyRNfLcNkuE=; b=v19dM7VtuQkXmllBjfsewSmQg6bjQLdwPxav2rYzTgFFekqDt1fO9IRh6Z66eUBYDb JO3RPOnGkzukHiGFzzzFZnyT4IpkTkXqak/vS3uwvh5Yff7oA0Y+3dzzlmd+tkIh4a7+ jfY1st3+XkcVeJkS8pJVQuxGp4/1cmQmzgIeTlPv27VxW2Y+KuBYSy/JvgSk1MHp2c0B AxJ4SQ9hbzdZ0zQ2xjlpkn+bHU6PDVNW0tL1jFGNzgNh+PYevwPfNEdSInRzbMFSZpCd zP+PnJPCxfqARI2Y1f/LjoWbPYyYliBP3z3GWKq66sPjDoGHbBQJ6djtJKG3VReTJ9EP 5R2g== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n28-20020a63721c000000b0053b99f632c9si2648436pgc.842.2023.05.22.19.56.35; Mon, 22 May 2023 19:56:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjEWCd4 (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Mon, 22 May 2023 22:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232034AbjEWCdz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 22:33:55 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72BFF185; Mon, 22 May 2023 19:33:51 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1q1HqE-00C99V-IG; Tue, 23 May 2023 10:33:39 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 23 May 2023 10:33:38 +0800 Date: Tue, 23 May 2023 10:33:38 +0800 From: Herbert Xu <herbert@gondor.apana.org.au> To: Stephen Rothwell <sfr@canb.auug.org.au>, Conor Dooley <conor.dooley@microchip.com> Cc: Linux Crypto List <linux-crypto@vger.kernel.org>, Huan Feng <huan.feng@starfivetech.com>, Jia Jie Ho <jiajie.ho@starfivetech.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org> Subject: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Message-ID: <ZGwmAp5RPqAjVMCg@gondor.apana.org.au> References: <20230522105257.562cb1ec@canb.auug.org.au> <ZGr6aB9uJVnyfJQ9@gondor.apana.org.au> <20230523103637.20175fbc@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230523103637.20175fbc@canb.auug.org.au> X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,TVD_RCVD_IP,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766651969662342774?= X-GMAIL-MSGID: =?utf-8?q?1766651969662342774?= |
Series |
crypto: starfive - Depend on AMBA_PL08X instead of selecting it
|
|
Commit Message
Herbert Xu
May 23, 2023, 2:33 a.m. UTC
On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote: > > That did not fix it :-( OK, this patch should fix it: ---8<--- A platform option like AMBA should never be selected by a driver. Use a dependency instead. Also remove the depenency on DMADEVICES because the driver builds just fine without it. Instead add a dependency on HAS_DMA for dma mapping support. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Comments
On Tue, May 23, 2023 at 10:33:38AM +0800, Herbert Xu wrote: > On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote: > > > > That did not fix it :-( > > OK, this patch should fix it: > > ---8<--- > A platform option like AMBA should never be selected by a driver. > Use a dependency instead. Randy submitted a patch to change the driver to not conflict with the arch symbols: https://lore.kernel.org/all/20230523000606.9405-1-rdunlap@infradead.org/ The corresponding change here makes sense to me, Reviewed-by: Conor Dooley <conor.dooley@microchip.com> @StarFive folks, you will need to go and submit a patch for arch/riscv/Kconfig.socs that selects ARM_AMBA for your platform. > Also remove the depenency on DMADEVICES because the driver builds > just fine without it. Instead add a dependency on HAS_DMA for dma > mapping support. > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Reported-by: Conor Dooley <conor.dooley@microchip.com> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig > index 908c162ba79a..59002abcc0ad 100644 > --- a/drivers/crypto/starfive/Kconfig > +++ b/drivers/crypto/starfive/Kconfig > @@ -4,14 +4,13 @@ > > config CRYPTO_DEV_JH7110 > tristate "StarFive JH7110 cryptographic engine driver" > - depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES > + depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST While we are changing everything, would you mind doing s/SOC/ARCH/ here? I didn't notice that while the series was being reviewed. Otherwise, I'll send you a patch for it. Cheers, Conor.
On 23/5/2023 2:56 pm, Conor Dooley wrote: > On Tue, May 23, 2023 at 10:33:38AM +0800, Herbert Xu wrote: >> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote: >> > >> > That did not fix it :-( >> >> OK, this patch should fix it: >> >> ---8<--- >> A platform option like AMBA should never be selected by a driver. >> Use a dependency instead. > > Randy submitted a patch to change the driver to not conflict with > the arch symbols: > https://lore.kernel.org/all/20230523000606.9405-1-rdunlap@infradead.org/ > > The corresponding change here makes sense to me, > Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > > @StarFive folks, you will need to go and submit a patch for > arch/riscv/Kconfig.socs that selects ARM_AMBA for your platform. > Sure, I'll submit a patch for this. Thanks Jia Jie
Hi Herbert, On Tue, 23 May 2023 10:33:38 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote: > > On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote: > > > > That did not fix it :-( > > OK, this patch should fix it: That seems to have fixed it, thanks.
Hi Herbert, On Tue, May 23, 2023 at 4:40 AM Herbert Xu <herbert@gondor.apana.org.au> wrote: > On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote: > > That did not fix it :-( > > OK, this patch should fix it: > > ---8<--- > A platform option like AMBA should never be selected by a driver. > Use a dependency instead. FTR: arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080 arch/arm/mach-s3c/Kconfig.s3c64xx- def_bool DMADEVICES arch/arm/mach-s3c/Kconfig.s3c64xx: select AMBA_PL08X > > Also remove the depenency on DMADEVICES because the driver builds > just fine without it. Instead add a dependency on HAS_DMA for dma > mapping support. > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Reported-by: Conor Dooley <conor.dooley@microchip.com> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig > index 908c162ba79a..59002abcc0ad 100644 > --- a/drivers/crypto/starfive/Kconfig > +++ b/drivers/crypto/starfive/Kconfig > @@ -4,14 +4,13 @@ > > config CRYPTO_DEV_JH7110 > tristate "StarFive JH7110 cryptographic engine driver" > - depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES > + depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST > + depends on HAS_DMA > select CRYPTO_ENGINE > select CRYPTO_HMAC > select CRYPTO_SHA256 > select CRYPTO_SHA512 > select CRYPTO_SM3_GENERIC > - select ARM_AMBA > - select AMBA_PL08X > help > Support for StarFive JH7110 crypto hardware acceleration engine. > This module provides acceleration for public key algo, Gr{oetje,eeting}s, Geert
On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote: > > > ---8<--- > > A platform option like AMBA should never be selected by a driver. > > Use a dependency instead. > > FTR: > > arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080 > arch/arm/mach-s3c/Kconfig.s3c64xx- def_bool DMADEVICES > arch/arm/mach-s3c/Kconfig.s3c64xx: select AMBA_PL08X Well that isn't a driver I think so it might be OK? Cheers,
Hi Herbert, On Tue, Jun 6, 2023 at 11:31 AM Herbert Xu <herbert@gondor.apana.org.au> wrote: > On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote: > > > > > ---8<--- > > > A platform option like AMBA should never be selected by a driver. > > > Use a dependency instead. > > > > FTR: > > > > arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080 > > arch/arm/mach-s3c/Kconfig.s3c64xx- def_bool DMADEVICES > > arch/arm/mach-s3c/Kconfig.s3c64xx: select AMBA_PL08X > > Well that isn't a driver I think so it might be OK? Thanks, please ignore ;-) Gr{oetje,eeting}s, Geert
diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig index 908c162ba79a..59002abcc0ad 100644 --- a/drivers/crypto/starfive/Kconfig +++ b/drivers/crypto/starfive/Kconfig @@ -4,14 +4,13 @@ config CRYPTO_DEV_JH7110 tristate "StarFive JH7110 cryptographic engine driver" - depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES + depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST + depends on HAS_DMA select CRYPTO_ENGINE select CRYPTO_HMAC select CRYPTO_SHA256 select CRYPTO_SHA512 select CRYPTO_SM3_GENERIC - select ARM_AMBA - select AMBA_PL08X help Support for StarFive JH7110 crypto hardware acceleration engine. This module provides acceleration for public key algo,