mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Marouene Boubakri (OSS)" <marouene.boubakri@oss.nxp.com>
To: Jens Wiklander <jens.wiklander@oss.qualcomm.com>,
	"Marouene Boubakri (OSS)" <marouene.boubakri@oss.nxp.com>
Cc: arm <arm@kernel.org>, "soc@kernel.org" <soc@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"op-tee@lists.trustedfirmware.org"
	<op-tee@lists.trustedfirmware.org>, Arnd Bergmann <arnd@arndb.de>
Subject: RE: [GIT PULL] OP-TEE update for v7.4
Date: Tue, 3 Nov 2026 17:03:35 +0000	[thread overview]
Message-ID: <AS8PR04MB75909BDC3F24F08D5723ED43FC692@AS8PR04MB7590.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAGgiveWadMfHBMu=vSeqwgoz8rcXXg4E9OrAKnkWPPFn07pimw@mail.gmail.com>

Hi Jens,


NXP Confidential
On Tue, Nov 3, 2026 Jens Wiklander wrote:
> Can you make a v5 of "[PATCH v4] tee: optee: build the Arm-specific
> code only on Arm" addressing Arnd's comments, please? That is, replacing
> IS_REACHABLE() with IS_ENABLED() in the patch. As Arnd points out, with
> OPTEE depending on ARM_FFA_TRANSPORT || !ARM_FFA_TRANSPORT, the code is
> always reachable if enabled.

Sure, I just sent v here  https://lore.kernel.org/all/20261103171504.910646-1-marouene.boubakri@oss.nxp.com/which replaces IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
with IS_ENABLED(CONFIG_ARM_FFA_TRANSPORT) in optee_private.h, so the
layout of struct optee no longer depends on whether the includer is
built-in or modular. The rest of the patch is unchanged from v4.

Arnd, thanks for catching this, and sorry for the noise.

Thanks,
Marouene

-----Original Message-----
From: Jens Wiklander <jens.wiklander@oss.qualcomm.com>
Sent: Tuesday, November 3, 2026 4:24 PM
To: Marouene Boubakri (OSS) <marouene.boubakri@oss.nxp.com>
Cc: arm <arm@kernel.org>; soc@kernel.org; linux-kernel@vger.kernel.org; op-tee@lists.trustedfirmware.org; Arnd Bergmann <arnd@arndb.de>
Subject: Re: [GIT PULL] OP-TEE update for v7.4

Hi Marouene,

Can you make a v5 of "[PATCH v4] tee: optee: build the Arm-specific code only on Arm" addressing Arnd's comments, please? That is, replacing IS_REACHABLE() with IS_ENABLED() in the patch. As Arnd points out, with  OPTEE depending on ARM_FFA_TRANSPORT || !ARM_FFA_TRANSPORT, the code is always reachable if enabled.

Thanks,
Jens

On Wed, Oct 14, 2026 at 8:34 AM Jens Wiklander <jens.wiklander@oss.qualcomm.com> wrote:
>
> Hi Arnd,
>
> On Tue, Oct 13, 2026 at 4:53 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Fri, Oct 2, 2026, at 16:51, Jens Wiklander wrote:
> > > for you to fetch changes up to ccd4b23398acaf2139cf04f1ba0a66150cbf2663:
> > >
> > >   tee: optee: build the Arm-specific code only on Arm (2026-10-02
> > > 16:28:41 +0200)
> > >
> > > ----------------------------------------------------------------
> > > Build the OP-TEE driver's SMC and FF-A code only where supported
> > >
> > > ----------------------------------------------------------------
> > > Marouene Boubakri (1):
> > >       tee: optee: build the Arm-specific code only on Arm
> >
> > I had a look at the contents and saw that it keeps the
> > IS_REACHABLE() checks that are notoriously error-prone.
> > E.g. this part just looks broken:
> >
> > @@ -257,8 +266,12 @@ struct optee {
> >         const struct optee_ops *ops;
> >         struct tee_context *ctx;
> >         union {
> > +#ifdef CONFIG_HAVE_ARM_SMCCC
> >                 struct optee_smc smc;
> > +#endif
> > +#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
> >                 struct optee_ffa ffa;
> > +#endif
> >         };
> >         struct optee_shm_arg_cache shm_arg_cache;
> >         struct optee_call_queue call_queue;
> >
> > The presence of the 'ffa' member in the union is conditional on
> > whether the driver that includes the header is a loadable module or
> > built-in, and this changes the entire structure layout if both types
> > of users are present.
> >
> > The intention of the patch does make a lot of sense, but as far as I
> > can tell, only the Kconfig change is actually required, while the
> > added preprocessor checks only make it harder to read and it should
> > have been sufficient to change the existing IS_REACHABLE() to
> > IS_ENABLED() for consistency.
> >
> > Sorry I did not notice this one earlier as I was travelling, but I
> > think I can't pull this version, please respin.
>
> Thanks for catching this. We'll repin.
>
> Cheers,
> Jens

      reply	other threads:[~2026-11-03 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 14:51 Jens Wiklander
2026-10-13 14:53 ` Arnd Bergmann
2026-10-14  6:34   ` Jens Wiklander
2026-11-03 15:24     ` Jens Wiklander
2026-11-03 17:03       ` Marouene Boubakri (OSS) [this message]

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=AS8PR04MB75909BDC3F24F08D5723ED43FC692@AS8PR04MB7590.eurprd04.prod.outlook.com \
    --to=marouene.boubakri@oss.nxp.com \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=jens.wiklander@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=soc@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 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®