[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHUa44FhRO0AO3nDXSoZ7O_9T3EFB47D34zRooCTd6fhXFzxXw@mail.gmail.com>
Date: Wed, 7 Jan 2026 10:38:19 +0100
From: Jens Wiklander <jens.wiklander@...aro.org>
To: Sudeep Holla <sudeep.holla@....com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Jonathan Corbet <corbet@....net>, Sumit Garg <sumit.garg@...nel.org>,
Olivia Mackall <olivia@...enic.com>, Herbert Xu <herbert@...dor.apana.org.au>,
Clément Léger <clement.leger@...tlin.com>,
Ard Biesheuvel <ardb@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, Sumit Garg <sumit.garg@....qualcomm.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>, Jan Kiszka <jan.kiszka@...mens.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>, Rafał Miłecki <zajec5@...il.com>,
Michael Chan <michael.chan@...adcom.com>, Pavan Chebbi <pavan.chebbi@...adcom.com>,
James Bottomley <James.Bottomley@...senpartnership.com>, Jarkko Sakkinen <jarkko@...nel.org>,
Mimi Zohar <zohar@...ux.ibm.com>, David Howells <dhowells@...hat.com>,
Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>, Peter Huewe <peterhuewe@....de>, op-tee@...ts.trustedfirmware.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-efi@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
Cristian Marussi <cristian.marussi@....com>, arm-scmi@...r.kernel.org,
linux-mips@...r.kernel.org, netdev@...r.kernel.org,
linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
linux-security-module@...r.kernel.org, Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH v2 00/17] tee: Use bus callbacks instead of driver callbacks
On Tue, Jan 6, 2026 at 2:40 PM Sudeep Holla <sudeep.holla@....com> wrote:
>
> On Mon, Jan 05, 2026 at 10:16:09AM +0100, Jens Wiklander wrote:
> > Hi,
> >
> > On Thu, Dec 18, 2025 at 5:29 PM Jens Wiklander
> > <jens.wiklander@...aro.org> wrote:
> > >
> > > On Thu, Dec 18, 2025 at 2:53 PM Alexandre Belloni
> > > <alexandre.belloni@...tlin.com> wrote:
> > > >
> > > > On 18/12/2025 08:21:27+0100, Jens Wiklander wrote:
> > > > > Hi,
> > > > >
> > > > > On Mon, Dec 15, 2025 at 3:17 PM Uwe Kleine-König
> > > > > <u.kleine-koenig@...libre.com> wrote:
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > the objective of this series is to make tee driver stop using callbacks
> > > > > > in struct device_driver. These were superseded by bus methods in 2006
> > > > > > (commit 594c8281f905 ("[PATCH] Add bus_type probe, remove, shutdown
> > > > > > methods.")) but nobody cared to convert all subsystems accordingly.
> > > > > >
> > > > > > Here the tee drivers are converted. The first commit is somewhat
> > > > > > unrelated, but simplifies the conversion (and the drivers). It
> > > > > > introduces driver registration helpers that care about setting the bus
> > > > > > and owner. (The latter is missing in all drivers, so by using these
> > > > > > helpers the drivers become more correct.)
> > > > > >
> > > > > > v1 of this series is available at
> > > > > > https://lore.kernel.org/all/cover.1765472125.git.u.kleine-koenig@baylibre.com
> > > > > >
> > > > > > Changes since v1:
> > > > > >
> > > > > > - rebase to v6.19-rc1 (no conflicts)
> > > > > > - add tags received so far
> > > > > > - fix whitespace issues pointed out by Sumit Garg
> > > > > > - fix shutdown callback to shutdown and not remove
> > > > > >
> > > > > > As already noted in v1's cover letter, this series should go in during a
> > > > > > single merge window as there are runtime warnings when the series is
> > > > > > only applied partially. Sumit Garg suggested to apply the whole series
> > > > > > via Jens Wiklander's tree.
> > > > > > If this is done the dependencies in this series are honored, in case the
> > > > > > plan changes: Patches #4 - #17 depend on the first two.
> > > > > >
> > > > > > Note this series is only build tested.
> > > > > >
> > > > > > Uwe Kleine-König (17):
> > > > > > tee: Add some helpers to reduce boilerplate for tee client drivers
> > > > > > tee: Add probe, remove and shutdown bus callbacks to tee_client_driver
> > > > > > tee: Adapt documentation to cover recent additions
> > > > > > hwrng: optee - Make use of module_tee_client_driver()
> > > > > > hwrng: optee - Make use of tee bus methods
> > > > > > rtc: optee: Migrate to use tee specific driver registration function
> > > > > > rtc: optee: Make use of tee bus methods
> > > > > > efi: stmm: Make use of module_tee_client_driver()
> > > > > > efi: stmm: Make use of tee bus methods
> > > > > > firmware: arm_scmi: optee: Make use of module_tee_client_driver()
> > > > > > firmware: arm_scmi: Make use of tee bus methods
> > > > > > firmware: tee_bnxt: Make use of module_tee_client_driver()
> > > > > > firmware: tee_bnxt: Make use of tee bus methods
> > > > > > KEYS: trusted: Migrate to use tee specific driver registration
> > > > > > function
> > > > > > KEYS: trusted: Make use of tee bus methods
> > > > > > tpm/tpm_ftpm_tee: Make use of tee specific driver registration
> > > > > > tpm/tpm_ftpm_tee: Make use of tee bus methods
> > > > > >
> > > > > > Documentation/driver-api/tee.rst | 18 +----
> > > > > > drivers/char/hw_random/optee-rng.c | 26 ++----
> > > > > > drivers/char/tpm/tpm_ftpm_tee.c | 31 +++++---
> > > > > > drivers/firmware/arm_scmi/transports/optee.c | 32 +++-----
> > > > > > drivers/firmware/broadcom/tee_bnxt_fw.c | 30 ++-----
> > > > > > drivers/firmware/efi/stmm/tee_stmm_efi.c | 25 ++----
> > > > > > drivers/rtc/rtc-optee.c | 27 ++-----
> > > > > > drivers/tee/tee_core.c | 84 ++++++++++++++++++++
> > > > > > include/linux/tee_drv.h | 12 +++
> > > > > > security/keys/trusted-keys/trusted_tee.c | 17 ++--
> > > > > > 10 files changed, 164 insertions(+), 138 deletions(-)
> > > > > >
> > > > > > base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> > > > > > --
> > > > > > 2.47.3
> > > > > >
> > > > >
> > > > > Thank you for the nice cleanup, Uwe.
> > > > >
> > > > > I've applied patch 1-3 to the branch tee_bus_callback_for_6.20 in my
> > > > > tree at https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee.git/
> > > > >
> > > > > The branch is based on v6.19-rc1, and I'll try to keep it stable for
> > > > > others to depend on, if needed. Let's see if we can agree on taking
> > > > > the remaining patches via that branch.
> > > >
> > > > 6 and 7 can go through your branch.
> > >
> > > Good, I've added them to my branch now.
> >
> > This entire patch set should go in during a single merge window. I
> > will not send any pull request until I'm sure all patches will be
> > merged.
> >
> > So far (if I'm not mistaken), only the patches I've already added to
> > next have appeared next. I can take the rest of the patches, too, but
> > I need OK for the following:
> >
>
> [...]
>
> >
> > Sudeep, you seem happy with the following patches
> > - firmware: arm_scmi: optee: Make use of module_tee_client_driver()
> > - firmware: arm_scmi: Make use of tee bus methods
> > OK if I take them via my tree, or would you rather take them yourself?
> >
>
> I am happy if you want to take all of them in one go. I think I have
> already acked it. Please shout if you need anything else from me, happy to
> help in anyway to make it easier to handle this change set.
Thanks, I've applied all the patches in the series now, since it
otherwise causes warnings during boot.
/Jens
Powered by blists - more mailing lists