mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Horia Geanta <horia.geanta@nxp.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Gaurav Jain <gaurav.jain@nxp.com>,
	Pankaj Gupta <pankaj.gupta@nxp.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Silvano Di Ninno <silvano.dininno@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Sahil Malhotra <sahil.malhotra@nxp.com>,
	Nikolaus Voss <nikolaus.voss@haag-streit.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH] crypto: caam - use JobR's space to access page 0 regs
Date: Wed, 13 Nov 2024 16:22:12 +0000	[thread overview]
Message-ID: <d3800aa8-dd28-43f7-ab80-339a978740dc@nxp.com> (raw)
In-Reply-To: <93e915b3-ef8e-4b98-aa7f-7759ae0b3091@pengutronix.de>

On 11/11/2024 2:22 PM, Ahmad Fatoum wrote:
> Hello Guarav,
> 
> Thanks for your patch.
> 
> On 11.11.24 13:10, Gaurav Jain wrote:
[...]
>>  #define pr_fmt(fmt) "caam blob_gen: " fmt
>> @@ -104,7 +105,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
>>  	}
>>  
>>  	ctrlpriv = dev_get_drvdata(jrdev->parent);
>> -	moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
>> +	moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->jr[0]->perfmon.status));
> 
> I believe your change is correct, but I would prefer that ctrlpriv gets a perfmon
> member that is initialized in caam_probe to either &ctrlpriv->ctrl->perfmon.status
> or &ctrlpriv->jr[0]->perfmon.status and then the code here would just use
> &ctrlpriv->perfmon->status.
> 
> This would simplify code not only here, but also in caam_ctrl_rng_init.
> 
Agree.
But maybe this refactoring deserves a separate patch, given that is should also
cover the case when the Job Ring device corresponding to "ctrlpriv->jr[0]"
is unbounded from the driver.

Thanks,
Horia


  reply	other threads:[~2024-11-13 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 12:10 Gaurav Jain
2024-11-11 12:22 ` Ahmad Fatoum
2024-11-13 16:22   ` Horia Geanta [this message]
2024-11-18  9:31   ` [EXT] " Gaurav Jain
2024-11-21 10:44     ` Ahmad Fatoum
2024-11-21 11:25       ` Gaurav Jain
2024-11-11 12:12 Gaurav Jain

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=d3800aa8-dd28-43f7-ab80-339a978740dc@nxp.com \
    --to=horia.geanta@nxp.com \
    --cc=V.Sethi@nxp.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@pengutronix.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meenakshi.aggarwal@nxp.com \
    --cc=nikolaus.voss@haag-streit.com \
    --cc=pankaj.gupta@nxp.com \
    --cc=sahil.malhotra@nxp.com \
    --cc=silvano.dininno@nxp.com \
    /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

all inboxes | Powered by JetHome®