[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <893731e9c8e4e74bb0d967ab2e7039e862896dc5.camel@gmail.com>
Date: Wed, 08 Oct 2025 17:07:46 +0200
From: Bean Huo <huobean@...il.com>
To: Jens Wiklander <jens.wiklander@...aro.org>
Cc: avri.altman@....com, bvanassche@....org, alim.akhtar@...sung.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com, can.guo@....qualcomm.com,
ulf.hansson@...aro.org, beanhuo@...ron.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] scsi: ufs: core: Add OP-TEE based RPMB driver
for UFS devices
Jens,
I incorporated your suggestions in my v3 excpet these two:
On Wed, 2025-10-01 at 09:50 +0200, Jens Wiklander wrote:
> > diff --git a/drivers/ufs/core/Makefile b/drivers/ufs/core/Makefile
> > index cf820fa09a04..51e1867e524e 100644
> > --- a/drivers/ufs/core/Makefile
> > +++ b/drivers/ufs/core/Makefile
> > @@ -2,6 +2,7 @@
> >
> > obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
> > ufshcd-core-y += ufshcd.o ufs-sysfs.o ufs-mcq.o
> > +ufshcd-core-$(CONFIG_RPMB) += ufs-rpmb.o
>
> SCSI_UFSHCD might need the same trick ("depends on RPMB || !RPMB") in
> Kconfig as we have for MMC_BLOCK.
>
> >
When RPMB=m and SCSI_UFSHCD=y, the ufs-rpmb.o is compiled into the built-in
ufshcd-core, ufs-rpmb.c calls functions from the OP-TEE RPMB subsystem module,
The kernel allows built-in code to reference module symbols (they become runtime
dependencies, not link-time), please check, I tested.
> >
> >
>
> > +
> > + struct rpmb_descr descr = {
> > + .type = RPMB_TYPE_UFS,
>
> We'll need another type if the device uses the extended RPMB frame
> format. How about you clarify this, where RPMB_TYPE_UFS is defined to
> avoid confusion?
As ufs-bsg.c, we could use ARPMB_TYPE_UFS for UFS advanced RPMB frame, if it is
RPMB, we take it as normal RPMB, the frame should be the same as MMC RPMB.
Kind regards,
Bean
Powered by blists - more mailing lists