Skip to content

Genericise the IOVA allocator

Robin Murphy linux-arm-kernel linux-iommu 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Changes since RFC from the cover letter

Patch 1: Use a proper Kconfig symbol rather than a hack Patch 4: sanity check for powers of two also, and clarify the comment

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommu: allow building iova.c independentlydrivers/iommu/Kconfig drivers/iommu/Makefile+6 -10 replies
2/4iommu: consolidate IOVA allocator codedrivers/iommu/intel-iommu.c drivers/iommu/iova.c include/linux/iova.h+40 -310 replies
3/4iommu: make IOVA domain low limit flexibledrivers/iommu/intel-iommu.c drivers/iommu/iova.c include/linux/iova.h+15 -110 replies
4/4iommu: make IOVA domain page size explicitdrivers/iommu/intel-iommu.c drivers/iommu/iova.c include/linux/iova.h+49 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Genericise the IOVA allocator

Hi all,

Here's an update of my previous RFC[1] in preparation for hooking the IOVA allocator up to the arm64 DMA mapping API, rebased onto 3.19-rc3.

I tried rebasing patches 3 and 4 onto Sakari's RFC series[2] (the merge conflict is pretty trivial), however I found that series applied to rc3 causes a build error in intel-iommu.c. Thus for now I've left in my simpler patches 1 and 2 for breaking out the library. Hopefully we can reach some consensus on that.

Tested on arm64 (DMA mapping series coming soon), and compile-tested for x86_64_defconfig.

Changes since RFC:
Patch 1: Use a proper Kconfig symbol rather than a hack Patch 4: sanity check for powers of two also, and clarify the comment

[1]:http://thread.gmane.org/gmane.linux.kernel.iommu/7480 [2]:http://thread.gmane.org/gmane.linux.kernel.iommu/7436

Robin Murphy (4):
iommu: allow building iova.c independently
iommu: consolidate IOVA allocator code
iommu: make IOVA domain low limit flexible
iommu: make IOVA domain page size explicit

 drivers/iommu/Kconfig       |  4 ++++
 drivers/iommu/Makefile      |  3 ++-
 drivers/iommu/intel-iommu.c | 45 ++++++++++----------------------------
 drivers/iommu/iova.c        | 53 +++++++++++++++++++++++++++++++++++++++++----
 include/linux/iova.h        | 41 +++++++++++++++++++++++++++++++----
 5 files changed, 103 insertions(+), 43 deletions(-)
Signature · 1 line
1.9.1