Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7130/1: dev_archdata: add private iommu extension

Add a private iommu pointer to the ARM-specific arch data in the
device struct, which will be used to attach iommu-specific data
to devices which require iommu support.

Different iommu implementations (on different platforms) will attach
different types of data to this pointer, so 'void *' is currently used
(the downside is reduced typesafety).

Note: ia64, x86 and sparc have this exact iommu extension as well, and
if others are likely to adopt it too, we might want to consider
adding this to the device struct itself directly.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Ohad Ben-Cohen and committed by
Russell King
cfb470b3 01885bc5

+3
+3
arch/arm/include/asm/device.h
··· 10 10 #ifdef CONFIG_DMABOUNCE 11 11 struct dmabounce_device_info *dmabounce; 12 12 #endif 13 + #ifdef CONFIG_IOMMU_API 14 + void *iommu; /* private IOMMU data */ 15 + #endif 13 16 }; 14 17 15 18 struct pdev_archdata {