Re: [PATCH 1/3] drivers: base: Add generic context device bus

From: Greg Kroah-Hartman

Date: Tue Apr 14 2026 - 12:50:33 EST


On Tue, Apr 14, 2026 at 10:01:15PM +0530, Ekansh Gupta via B4 Relay wrote:
> From: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>
>
> Introduce a new generic bus type for synthetic context bank devices
> that require IOMMU context isolation. This bus provides a shared
> infrastructure for accelerator and GPU drivers that create virtual
> devices representing IOMMU context banks.
>
> Currently, drivers like host1x implement their own bus types for
> context devices. This generic implementation allows multiple drivers
> to share the same bus infrastructure, simplifying the IOMMU subsystem
> integration and reducing code duplication.
>
> Signed-off-by: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>
> ---
> drivers/base/Kconfig | 3 +++
> drivers/base/Makefile | 1 +
> drivers/base/context_bus.c | 24 ++++++++++++++++++++++++
> include/linux/context_bus.h | 15 +++++++++++++++
> 4 files changed, 43 insertions(+)
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index f7d385cbd3ba..479bc4bb442b 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -4,6 +4,9 @@ menu "Generic Driver Options"
> config AUXILIARY_BUS
> bool
>
> +config CONTEXT_DEVICE_BUS
> + bool

So this is a context-free bus? I.e. no documentation?

:)

This feels really odd, this "bus" isn't doing anything at all. So why
do you need it and can't use auxbus or faux?

You say something about an iommu, but yet this has no information about
an iommu at all, so why are they somehow special?

You need to provide a lot more information here, sorry.

greg k-h