[PATCH 6/9] arm64: device: add iommu pointer to device archdata

Will Deacon will.deacon at arm.com
Mon Jun 10 14:34:42 EDT 2013

When using an IOMMU for device mappings, it is necessary to keep a
pointer between the device and the IOMMU to which it is attached in
order to obtain the correct IOMMU when attaching the device to a domain.

This patch adds an iommu pointer to the dev_archdata structure, in a
similar manner to other architectures (ARM, PowerPC, x86, ...).

Cc: Catalin Marinas <catalin.marinas at arm.com>
Signed-off-by: Will Deacon <will.deacon at arm.com>
 arch/arm64/include/asm/device.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/include/asm/device.h b/arch/arm64/include/asm/device.h
index 07dd743..01fac31 100644
--- a/arch/arm64/include/asm/device.h
+++ b/arch/arm64/include/asm/device.h
@@ -18,6 +18,9 @@
 struct dev_archdata {
 	struct dma_map_ops *dma_ops;
+	void *iommu; /* private IOMMU data */
 	struct dma_iommu_mapping	*mapping;

More information about the linux-arm-kernel mailing list