public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Introduce generic context device bus for IOMMU context isolation
@ 2026-04-14 16:31 Ekansh Gupta via B4 Relay
  2026-04-14 16:31 ` [PATCH 1/3] drivers: base: Add generic context device bus Ekansh Gupta via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ekansh Gupta via B4 Relay @ 2026-04-14 16:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Thierry Reding, Mikko Perttunen, David Airlie, Simona Vetter,
	Joerg Roedel, Will Deacon, Robin Murphy, Arnd Bergmann,
	Srinivas Kandagatla, Dmitry Baryshkov, Bharath Kumar,
	Chenna Kesava Raju
  Cc: linux-kernel, driver-core, dri-devel, linux-tegra, iommu,
	linux-arm-msm, Ekansh Gupta

This series introduces a generic context device bus to replace driver-specific
implementations and enable proper IOMMU handling of synthetic context bank
devices used by accelerator and GPU drivers.

Background:
-----------
During review of the fastrpc driver changes [1], it was pointed out that using
a platform driver for compute bank (CB) devices was incorrect since these are
synthetic IOMMU context banks, not real platform devices. The platform driver
approach also had a race condition where device nodes were created before
channel resources were initialized, and probe was async, allowing applications
to open devices before sessions were available.

The reviewer suggested following the pattern used in host1x_memory_context_list_init()
and creating devices manually. During review of the QDA driver [2], it was
further suggested to create a generic bus type that could be shared across
multiple drivers rather than having each driver implement its own bus.

This series implements that suggestion by:
1. Creating a generic context_device_bus_type in drivers/base/
2. Migrating the existing host1x driver to use it
3. Converting fastrpc to use it, fixing the race condition in the process

References:
-----------
[1] Fastrpc platform driver review:
    https://lore.kernel.org/all/golcrcr6voafr3fqsnihyjyut36sii55vzws4josfhkjjg3nie@ur43qq2kvlsv/

[2] QDA driver review requesting generic bus:
    https://lore.kernel.org/all/en5tdgemre7vq5qihe6wnkbrro24vtzwfxwqrpnrrmugxoszs7@x2ox64zeznvd/

Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
---
Ekansh Gupta (3):
      drivers: base: Add generic context device bus
      gpu: host1x: Migrate to generic context device bus
      misc: fastrpc: Use context device bus for compute banks

 drivers/base/Kconfig             |   3 +
 drivers/base/Makefile            |   1 +
 drivers/base/context_bus.c       |  24 ++++++
 drivers/gpu/host1x/Kconfig       |   5 +-
 drivers/gpu/host1x/Makefile      |   1 -
 drivers/gpu/host1x/context.c     |   2 +-
 drivers/gpu/host1x/context.h     |   3 +-
 drivers/gpu/host1x/context_bus.c |  26 ------
 drivers/iommu/iommu.c            |   6 +-
 drivers/misc/Kconfig             |   1 +
 drivers/misc/fastrpc.c           | 180 +++++++++++++++++++++++++++------------
 include/linux/context_bus.h      |  15 ++++
 12 files changed, 174 insertions(+), 93 deletions(-)
---
base-commit: 1c7cc4904160c6fc6377564140062d68a3dc93a0
change-id: 20260414-computebus-e852f994ee25

Best regards,
-- 
Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-19  0:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 16:31 [PATCH 0/3] Introduce generic context device bus for IOMMU context isolation Ekansh Gupta via B4 Relay
2026-04-14 16:31 ` [PATCH 1/3] drivers: base: Add generic context device bus Ekansh Gupta via B4 Relay
2026-04-14 16:49   ` Greg Kroah-Hartman
2026-04-15 17:34     ` Vishnu Reddy
2026-04-15 11:25   ` Srinivas Kandagatla
2026-04-15 17:16   ` Vishnu Reddy
2026-04-14 16:31 ` [PATCH 2/3] gpu: host1x: Migrate to " Ekansh Gupta via B4 Relay
2026-04-14 16:31 ` [PATCH 3/3] misc: fastrpc: Use context device bus for compute banks Ekansh Gupta via B4 Relay
2026-04-14 17:59   ` Dmitry Baryshkov
2026-04-15 11:36   ` Srinivas Kandagatla
2026-04-15 16:05   ` Vishnu Reddy
2026-04-19  0:16     ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox