[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3800aa8-dd28-43f7-ab80-339a978740dc@nxp.com>
Date: Wed, 13 Nov 2024 16:22:12 +0000
From: Horia Geanta <horia.geanta@....com>
To: Ahmad Fatoum <a.fatoum@...gutronix.de>, Gaurav Jain <gaurav.jain@....com>,
Pankaj Gupta <pankaj.gupta@....com>, Herbert Xu
<herbert@...dor.apana.org.au>, "David S . Miller" <davem@...emloft.net>,
Silvano Di Ninno <silvano.dininno@....com>, Varun Sethi <V.Sethi@....com>,
Meenakshi Aggarwal <meenakshi.aggarwal@....com>, Sahil Malhotra
<sahil.malhotra@....com>, Nikolaus Voss <nikolaus.voss@...g-streit.com>
CC: "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Pengutronix
Kernel Team <kernel@...gutronix.de>
Subject: Re: [PATCH] crypto: caam - use JobR's space to access page 0 regs
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
Powered by blists - more mailing lists