iommu: introduce generic page table allocation framework
authorWill Deacon <will.deacon@arm.com>
Fri, 14 Nov 2014 17:16:49 +0000 (17:16 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 19 Jan 2015 14:46:43 +0000 (14:46 +0000)
This patch introduces a generic framework for allocating page tables for
an IOMMU. There are a number of reasons we want to do this:

  - It avoids duplication of complex table management code in IOMMU
    drivers that use the same page table format

  - It removes any coupling with the CPU table format (and even the
    architecture!)

  - It defines an API for IOMMU TLB maintenance

Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/io-pgtable.c [new file with mode: 0644]
drivers/iommu/io-pgtable.h [new file with mode: 0644]

index 325188e..3faaa41 100644 (file)
@@ -13,6 +13,14 @@ menuconfig IOMMU_SUPPORT
 
 if IOMMU_SUPPORT
 
+menu "Generic IOMMU Pagetable Support"
+
+# Selected by the actual pagetable implementations
+config IOMMU_IO_PGTABLE
+       bool
+
+endmenu
+
 config OF_IOMMU
        def_bool y
        depends on OF && IOMMU_API
index 7b976f2..701c951 100644 (file)
@@ -1,6 +1,7 @@
 obj-$(CONFIG_IOMMU_API) += iommu.o
 obj-$(CONFIG_IOMMU_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
+obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o
 obj-$(CONFIG_OF_IOMMU) += of_iommu.o
 obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
Simple merge
Simple merge