linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/3] arm64: IOMMU-backed DMA mapping
@ 2015-10-01 19:13 Robin Murphy
  2015-10-01 19:13 ` [PATCH v6 1/3] iommu: Implement common IOMMU ops for " Robin Murphy
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: Robin Murphy @ 2015-10-01 19:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Here's the latest, and hopefully last, revision of the initial arm64
IOMMU dma_ops support.

There are a couple of dependencies still currently in -next and the
intel-iommu tree[0]: "iommu: iova: Move iova cache management to the
iova library" is necessary for the rename of iova_cache_get(), and
"iommu/iova: Avoid over-allocating when size-aligned" will be needed
with some IOMMU drivers to prevent unmapping errors.

Changes from v5[1]:
- Change __iommu_dma_unmap() from BUG to WARN when things go wrong, and
  prevent a NULL dereference on double-free.
- Fix iommu_dma_map_sg() to ensure segments can never inadvertently end
  mapped across a segment boundary. As a result, we have to lose the
  segment-merging optimisation from before (I might revisit that if
  there's some evidence it's really worthwhile, though).
- Cleaned up the platform device workarounds for config order and
  default domains, and removed the other hacks. Demanding that the IOMMU
  drivers assign groups, and support IOMMU_DOMAIN_DMA via the methods
  provided, keeps things bearable, and the behaviour should now be
  consistent across all cases.

As a bonus, whilst the underlying of_iommu_configure() code only supports
platform devices at the moment, I can also say that this has now been
tested to work for PCI devices too, via some horrible hacks on a Juno r1.

Thanks,
Robin.

[0]:http://thread.gmane.org/gmane.linux.kernel.iommu/11033
[1]:http://thread.gmane.org/gmane.linux.kernel.iommu/10439

Robin Murphy (3):
  iommu: Implement common IOMMU ops for DMA mapping
  arm64: Add IOMMU dma_ops
  arm64: Hook up IOMMU dma_ops

 arch/arm64/Kconfig                   |   1 +
 arch/arm64/include/asm/dma-mapping.h |  15 +-
 arch/arm64/mm/dma-mapping.c          | 457 ++++++++++++++++++++++++++++++
 drivers/iommu/Kconfig                |   7 +
 drivers/iommu/Makefile               |   1 +
 drivers/iommu/dma-iommu.c            | 524 +++++++++++++++++++++++++++++++++++
 include/linux/dma-iommu.h            |  85 ++++++
 include/linux/iommu.h                |   1 +
 8 files changed, 1083 insertions(+), 8 deletions(-)
 create mode 100644 drivers/iommu/dma-iommu.c
 create mode 100644 include/linux/dma-iommu.h

-- 
1.9.1

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

end of thread, other threads:[~2015-11-17 12:02 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 19:13 [PATCH v6 0/3] arm64: IOMMU-backed DMA mapping Robin Murphy
2015-10-01 19:13 ` [PATCH v6 1/3] iommu: Implement common IOMMU ops for " Robin Murphy
2015-10-26 13:44   ` Yong Wu
2015-10-26 16:55     ` Robin Murphy
2015-10-30  1:17       ` Daniel Kurtz
2015-10-30 14:09         ` Joerg Roedel
2015-10-30 14:27         ` Robin Murphy
2015-11-02 13:11           ` Daniel Kurtz
2015-11-02 13:43             ` Tomasz Figa
2015-11-03 17:41               ` Robin Murphy
2015-11-03 18:40                 ` Russell King - ARM Linux
2015-11-04  5:15                   ` Tomasz Figa
2015-11-04  9:10                     ` Russell King - ARM Linux
2015-11-04  5:12                 ` Tomasz Figa
2015-11-04  9:27                   ` Russell King - ARM Linux
2015-11-04  9:48                     ` Tomasz Figa
2015-11-04 10:50                       ` Russell King - ARM Linux
2015-11-09 13:11                   ` Robin Murphy
2015-11-17 12:02         ` Marek Szyprowski
2015-10-01 19:13 ` [PATCH v6 2/3] arm64: Add IOMMU dma_ops Robin Murphy
2015-10-06 11:00   ` Yong Wu
2015-10-07 16:07     ` Robin Murphy
2015-10-09  5:44       ` Yong Wu
2015-10-07  9:03   ` Anup Patel
2015-10-07 16:36     ` Robin Murphy
2015-10-07 17:40       ` Anup Patel
2015-10-14 11:47   ` Joerg Roedel
2015-10-14 13:35   ` Catalin Marinas
2015-10-14 16:34     ` Robin Murphy
2015-11-04  8:39   ` Yong Wu
2015-11-04 13:11     ` Robin Murphy
2015-11-04 17:35       ` Laura Abbott
2015-10-01 19:14 ` [PATCH v6 3/3] arm64: Hook up " Robin Murphy
2015-10-13 12:12 ` [PATCH v6 0/3] arm64: IOMMU-backed DMA mapping Robin Murphy
2015-10-14 11:50   ` joro at 8bytes.org
2015-10-14 18:19     ` Robin Murphy
2015-10-15 15:04 ` Joerg Roedel

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).