arm64: device: add iommu pointer to device archdata
authorWill Deacon <will.deacon@arm.com>
Mon, 10 Jun 2013 18:34:42 +0000 (19:34 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 15 May 2014 18:59:53 +0000 (19:59 +0100)
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, ...).

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 73150c983ac1f9b7653cfd3823b1ad4a44aad3bf)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/device.h

index 0d8453c755a8acb57593beb5c8afcda29e197f95..cf98b362094b22f232f042817f6a72ed2bac5dfb 100644 (file)
@@ -18,6 +18,9 @@
 
 struct dev_archdata {
        struct dma_map_ops *dma_ops;
+#ifdef CONFIG_IOMMU_API
+       void *iommu;                    /* private IOMMU data */
+#endif
 };
 
 struct pdev_archdata {