public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [RFC PATCH v2 4/7] soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver
Date: Wed, 8 Mar 2023 23:10:29 +0000	[thread overview]
Message-ID: <ZAkV5ZNeK5iHU0Uq@gmail.com> (raw)
In-Reply-To: <ZAkBwZNWMTsXlt+p@linaro.org>

On Wed, Mar 08, 2023 at 11:44:33PM +0200, Abel Vesa wrote:
> On 23-03-08 12:01:41, Eric Biggers wrote:
> > On Wed, Mar 08, 2023 at 05:58:35PM +0200, Abel Vesa wrote:
> > >  * Switched QCOM_INLINE_CRYPTO_ENGINE to tristate and made it built-in
> > >    if any of the UFS or the SDHC drivers are built-in. This is to allow
> > >    the API to be available even if the built-in driver doesn't have
> > >    crypto enabled.
> > [...]
> > > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
> > > index a8f283086a21..c584369e9810 100644
> > > --- a/drivers/soc/qcom/Kconfig
> > > +++ b/drivers/soc/qcom/Kconfig
> > > @@ -275,4 +275,10 @@ config QCOM_ICC_BWMON
> > >  	  the fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high
> > >  	  memory throughput even with lower CPU frequencies.
> > >  
> > > +config QCOM_INLINE_CRYPTO_ENGINE
> > > +	tristate
> > > +	depends on SCSI_UFS_CRYPTO || MMC_CRYPTO
> > > +	default y if SCSI_UFS_QCOM=y || MMC_SDHCI_MSM=y
> > > +	select QCOM_SCM
> > 
> > What are the "depends on" and "default y" lines above for?
> > 
> > You're already selecting this from SCSI_UFS_QCOM and MSM_SDHCI_MSM, as I had
> > suggested.  Isn't that enough?
> 
> We have the following:
> (SCSI_UFS_QCOM && SCSI_UFS_CRYPTO) || (MMC_SDHCI_MSM && MMC_CRYPTO)
> 
> So lets take as example the scenario: (m && y) || (y && n).
> 
> The QCOM_INLINE_CRYPTO_ENGINE will be set to 'm' and the sdhci driver
> will not be able to link properly since the ICE API is part of a module.
> 
> Therefore, if just one of SCSI_UFS_QCOM and MMC_SDHCI_MSM is built-in
> and at least one of the crypto options are enabled, set the
> QCOM_INLINE_CRYPTO_ENGINE to 'y' by default in order to make the
> built-in one linkage will not fail.
> 

That does not make sense.  If MMC_CRYPTO is disabled, then the sdhci-msm driver
should not call any of the ICE APIs.  Likewise for ufs-qcom and SCSI_UFS_CRYPTO.

- Eric

  reply	other threads:[~2023-03-08 23:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 15:58 [RFC PATCH v2 0/7] Add dedicated Qcom ICE driver Abel Vesa
2023-03-08 15:58 ` [RFC PATCH v2 1/7] dt-bindings: soc: qcom: Add schema for Inline Crypto Engine Abel Vesa
2023-03-09 10:25   ` Krzysztof Kozlowski
2023-03-08 15:58 ` [RFC PATCH v2 2/7] dt-bindings: ufs: qcom: Add ICE phandle and drop core clock Abel Vesa
2023-03-09 10:26   ` Krzysztof Kozlowski
2023-03-08 15:58 ` [RFC PATCH v2 3/7] dt-bindings: mmc: sdhci-msm: " Abel Vesa
2023-03-09 10:27   ` Krzysztof Kozlowski
2023-03-08 15:58 ` [RFC PATCH v2 4/7] soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver Abel Vesa
2023-03-08 20:01   ` Eric Biggers
2023-03-08 21:44     ` Abel Vesa
2023-03-08 23:10       ` Eric Biggers [this message]
2023-03-08 15:58 ` [RFC PATCH v2 5/7] scsi: ufs: ufs-qcom: Switch to the new ICE API Abel Vesa
2023-03-08 15:58 ` [RFC PATCH v2 6/7] mmc: sdhci-msm: " Abel Vesa
2023-03-10 12:45   ` Adrian Hunter
2023-03-08 15:58 ` [RFC PATCH v2 7/7] arm64: dts: qcom: Add the Inline Crypto Engine nodes Abel Vesa
2023-03-09 10:31   ` Krzysztof Kozlowski
2023-03-09 18:31     ` Eric Biggers
2023-03-10  8:13       ` Krzysztof Kozlowski
2023-03-10  9:21         ` Abel Vesa
2023-03-10  9:27           ` Krzysztof Kozlowski
2023-03-10  9:34             ` Abel Vesa
2023-03-10  9:37               ` Krzysztof Kozlowski
2023-03-10  9:42                 ` Abel Vesa
2023-03-10 20:00         ` Eric Biggers
2023-03-08 20:03 ` [RFC PATCH v2 0/7] Add dedicated Qcom ICE driver Eric Biggers
2023-03-08 21:55   ` Abel Vesa

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=ZAkV5ZNeK5iHU0Uq@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=abel.vesa@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=agross@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andersson@kernel.org \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox