[PATCH v2 0/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

From: Geert Uytterhoeven
Date: Fri Jan 27 2017 - 10:39:19 EST

Hi all,

Tis patch series adds helpers for DMA_ATTR_FORCE_CONTIGUOUS to the
generic IOMMU DMA code, and support for allocating physically contiguous
DMA buffers on arm64 systems with an IOMMU. This can be useful when two
or more devices with different memory requirements are involved in
buffer sharing.

Changes compared to v1:
- Provide standalone iommu_dma_{alloc,free}_contiguous() functions, as
requested by Robin Murphy,
- Handle dispatching in the arch (arm64) code, as requested by Robin
- Simplify operations by getting rid of the page array/scatterlist
dance, as the buffer is contiguous,
- Move CPU cache magement into the caller, which is much simpler with
a single contiguous buffer.

Thanks for your comments!

Geert Uytterhoeven (2):
iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS
arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

arch/arm64/mm/dma-mapping.c | 51 +++++++++++++++++++++++---------
drivers/iommu/dma-iommu.c | 72 +++++++++++++++++++++++++++++++++++++++++++++
include/linux/dma-iommu.h | 4 +++
3 files changed, 113 insertions(+), 14 deletions(-)




Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds