linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
@ 2018-07-26 23:16 Dmitry Osipenko
  2018-07-26 23:16 ` [RFC PATCH v1 1/6] driver core: Add option for disabling of backing devices DMA " Dmitry Osipenko
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Dmitry Osipenko @ 2018-07-26 23:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Thierry Reding,
	Jonathan Hunter, Mikko Perttunen, Rob Herring, Frank Rowand,
	Ben Skeggs, Russell King, Catalin Marinas, Will Deacon,
	Joerg Roedel, Nicolas Chauvet
  Cc: devicetree, nouveau, iommu, dri-devel, linux-tegra, linux-kernel

Hello,

There is a trouble on ARM with DMA allocations made by device drivers,
the trouble is that DMA allocations are getting implicitly backed with
IOMMU mapping by the driver core if IOMMU presents in a system and IOMMU
could handle device. This is an undesired behaviour for drivers that
manage IOMMU by themselves, like NVIDIA Tegra GPU driver. On arm32 the
implicit backing happens if CONFIG_ARM_DMA_USE_IOMMU=y (multiplatform
kernel configuration), on arm64 it happens if IOMMU domain type for a
device is equal to IOMMU_DOMAIN_DMA.

The proposed solution adds a new option to the base device driver
structure that allows device drivers to explicitly convey to the drivers
core that the implicit IOMMU backing for devices must not happen.

Dmitry Osipenko (6):
  driver core: Add option for disabling of backing devices DMA with
    IOMMU
  of/device: Don't back devices DMA with IOMMU if that's undesired by
    driver
  drm/tegra: Avoid implicit DMA backing with IOMMU
  gpu: host1x: Avoid implicit DMA backing with IOMMU
  drm/nouveau: tegra: Universally avoid implicit DMA backing with IOMMU
  Revert "drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping"

 drivers/gpu/drm/nouveau/nouveau_platform.c         |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 13 -------------
 drivers/gpu/drm/tegra/dc.c                         |  1 +
 drivers/gpu/drm/tegra/gr2d.c                       |  1 +
 drivers/gpu/drm/tegra/gr3d.c                       |  1 +
 drivers/gpu/drm/tegra/vic.c                        |  1 +
 drivers/gpu/host1x/dev.c                           |  1 +
 drivers/of/device.c                                |  7 +++++++
 include/linux/device.h                             |  2 ++
 9 files changed, 15 insertions(+), 13 deletions(-)

-- 
2.18.0


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

end of thread, other threads:[~2018-09-20 17:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 23:16 [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 1/6] driver core: Add option for disabling of backing devices DMA " Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 2/6] of/device: Don't back devices DMA with IOMMU if that's undesired by driver Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 3/6] drm/tegra: Avoid implicit DMA backing with IOMMU Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 4/6] gpu: host1x: " Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 5/6] drm/nouveau: tegra: Universally avoid " Dmitry Osipenko
2018-07-26 23:16 ` [RFC PATCH v1 6/6] Revert "drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping" Dmitry Osipenko
2018-07-27  8:25 ` [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU Joerg Roedel
2018-07-27  9:03   ` Will Deacon
2018-07-27 14:10     ` Dmitry Osipenko
2018-07-27 14:20       ` Joerg Roedel
2018-07-27 17:13         ` Rob Herring
2018-07-27 18:31           ` Joerg Roedel
2018-07-27 20:02             ` Dmitry Osipenko
2018-07-27 16:02       ` Robin Murphy
2018-07-27 17:03         ` Jordan Crouse
2018-07-27 17:16           ` Dmitry Osipenko
2018-07-28 11:40             ` Dmitry Osipenko
2018-08-02 18:24             ` Dmitry Osipenko
2018-08-03 15:43               ` Robin Murphy
2018-08-03 17:00                 ` Jordan Crouse
2018-08-15 19:56                 ` Dmitry Osipenko
2018-08-16 17:23                   ` Robin Murphy
2018-09-20 17:09                     ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).