All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neal Liu <neal_liu@aspeedtech.com>
To: Dhananjay Phadke <dphadke@linux.microsoft.com>,
	Corentin Labbe <clabbe.montjoie@gmail.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Randy Dunlap <rdunlap@infradead.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Johnny Huang <johnny_huang@aspeedtech.com>
Cc: "linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	BMC-SW <BMC-SW@aspeedtech.com>
Subject: RE: [PATCH v8 5/5] crypto: aspeed: add HACE crypto driver
Date: Thu, 28 Jul 2022 08:58:01 +0000	[thread overview]
Message-ID: <HK0PR06MB3202719AA188BB743BE0A36C80969@HK0PR06MB3202.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <450dee2f-63bf-51a7-730e-b780b594c1c5@linux.microsoft.com>

> On 7/26/2022 10:31 PM, Neal Liu wrote:
> >> Why are separate options required for hash and crypto algorithms, if
> >> hace is only hw crypto on the SoCs?
> >>
> >> Looks like that's requiring unnecessary __weak register / unregister
> >> functions [see below].
> >>
> >> Couldn't just two options CONFIG_CRYPTO_DEV_ASPEED and
> >> CONFIG_CRYPTO_DEV_ASPEED_DEBUG be simpler to set for downstream
> >> defconfigs?
> > I would like to separate different algorithms by different options for more
> convenient for further use and debug.
> > We also have RSA engine named ACRY, and would upstream once hash &
> crypto being accepted.
> > So combined them into one option seems not a good choice for multiple hw
> crypto, do you agree?
> 
> Not sure what's the use case of just enabling crypto or hash separately out of
> same HW engine and esp. when there's no alternative accel available, but
> that's fine.
> 
> If ARCY is different HW engine (interface) then having separate config sounds
> logical.
> 
> Multiplying DEBUG configs seems unnecessary though. With dynamic debug
> any of the dev_dbg could be turned on. Suggest using single one for the
> module, if not drop it altogether. Following code is still not covered by Kconfig,
> it in common code.
> 
>  > +#ifdef ASPEED_HACE_DEBUG
>  > +#define HACE_DBG(d, fmt, ...)	\
>  > +	dev_info((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
>  > +#else
>  > +#define HACE_DBG(d, fmt, ...)	\
>  > +	dev_dbg((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
>  > +#endif
> 
> Regards,
> Dhananjay

Okay, I'll leverage your suggestion with different crypto algos options and 1 debug option for all modules.
Thanks !


WARNING: multiple messages have this Message-ID (diff)
From: Neal Liu <neal_liu@aspeedtech.com>
To: Dhananjay Phadke <dphadke@linux.microsoft.com>,
	Corentin Labbe <clabbe.montjoie@gmail.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Randy Dunlap <rdunlap@infradead.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Johnny Huang <johnny_huang@aspeedtech.com>
Cc: "linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	BMC-SW <BMC-SW@aspeedtech.com>
Subject: RE: [PATCH v8 5/5] crypto: aspeed: add HACE crypto driver
Date: Thu, 28 Jul 2022 08:58:01 +0000	[thread overview]
Message-ID: <HK0PR06MB3202719AA188BB743BE0A36C80969@HK0PR06MB3202.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <450dee2f-63bf-51a7-730e-b780b594c1c5@linux.microsoft.com>

> On 7/26/2022 10:31 PM, Neal Liu wrote:
> >> Why are separate options required for hash and crypto algorithms, if
> >> hace is only hw crypto on the SoCs?
> >>
> >> Looks like that's requiring unnecessary __weak register / unregister
> >> functions [see below].
> >>
> >> Couldn't just two options CONFIG_CRYPTO_DEV_ASPEED and
> >> CONFIG_CRYPTO_DEV_ASPEED_DEBUG be simpler to set for downstream
> >> defconfigs?
> > I would like to separate different algorithms by different options for more
> convenient for further use and debug.
> > We also have RSA engine named ACRY, and would upstream once hash &
> crypto being accepted.
> > So combined them into one option seems not a good choice for multiple hw
> crypto, do you agree?
> 
> Not sure what's the use case of just enabling crypto or hash separately out of
> same HW engine and esp. when there's no alternative accel available, but
> that's fine.
> 
> If ARCY is different HW engine (interface) then having separate config sounds
> logical.
> 
> Multiplying DEBUG configs seems unnecessary though. With dynamic debug
> any of the dev_dbg could be turned on. Suggest using single one for the
> module, if not drop it altogether. Following code is still not covered by Kconfig,
> it in common code.
> 
>  > +#ifdef ASPEED_HACE_DEBUG
>  > +#define HACE_DBG(d, fmt, ...)	\
>  > +	dev_info((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
>  > +#else
>  > +#define HACE_DBG(d, fmt, ...)	\
>  > +	dev_dbg((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
>  > +#endif
> 
> Regards,
> Dhananjay

Okay, I'll leverage your suggestion with different crypto algos options and 1 debug option for all modules.
Thanks !

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-07-28  8:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 11:34 [PATCH v8 0/5] Add Aspeed crypto driver for hardware acceleration Neal Liu
2022-07-26 11:34 ` Neal Liu
2022-07-26 11:34 ` [PATCH v8 1/5] crypto: aspeed: Add HACE hash driver Neal Liu
2022-07-26 11:34   ` Neal Liu
2022-08-08  2:53   ` liulongfang
2022-08-08  2:53     ` liulongfang
2022-08-08  9:30     ` Neal Liu
2022-08-08  9:30       ` Neal Liu
2022-08-08 11:49       ` liulongfang
2022-08-08 11:49         ` liulongfang
2022-08-09  7:39         ` Neal Liu
2022-08-09  7:39           ` Neal Liu
2022-08-09 12:39           ` liulongfang
2022-08-09 12:39             ` liulongfang
2022-08-11  3:31             ` Neal Liu
2022-08-11  3:31               ` Neal Liu
2022-07-26 11:34 ` [PATCH v8 2/5] dt-bindings: clock: Add AST2500/AST2600 HACE reset definition Neal Liu
2022-07-26 11:34   ` Neal Liu
2022-07-26 11:34 ` [PATCH v8 3/5] ARM: dts: aspeed: Add HACE device controller node Neal Liu
2022-07-26 11:34   ` Neal Liu
2022-07-26 11:34 ` [PATCH v8 4/5] dt-bindings: crypto: add documentation for aspeed hace Neal Liu
2022-07-26 11:34   ` Neal Liu
2022-07-26 11:34 ` [PATCH v8 5/5] crypto: aspeed: add HACE crypto driver Neal Liu
2022-07-26 11:34   ` Neal Liu
2022-07-26 20:41   ` Dhananjay Phadke
2022-07-26 20:41     ` Dhananjay Phadke
2022-07-27  5:31     ` Neal Liu
2022-07-27  5:31       ` Neal Liu
2022-07-28  6:18       ` Dhananjay Phadke
2022-07-28  6:18         ` Dhananjay Phadke
2022-07-28  8:58         ` Neal Liu [this message]
2022-07-28  8:58           ` Neal Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HK0PR06MB3202719AA188BB743BE0A36C80969@HK0PR06MB3202.apcprd06.prod.outlook.com \
    --to=neal_liu@aspeedtech.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dphadke@linux.microsoft.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=joel@jms.id.au \
    --cc=johnny_huang@aspeedtech.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.