Thread (7 messages) 7 messages, 2 authors, 2014-06-05

[PATCH 1/1] device.h: arm,dma-iommu: Move out dma_iommu_mapping struct

From: gregkh@linuxfoundation.org (Greg KH)
Date: 2014-06-04 17:48:08
Also in: lkml

On Wed, Jun 04, 2014 at 01:41:46PM +0530, ritesh.harjani at gmail.com wrote:
From: Ritesh Harjani <redacted>

This patch moves out *mapping pointer of dma_iommu_mapping
from arch/arm/include/asm/device.h to include/liunux/device.h
Why?  Who else can use this becides arm devices?
Also, it moves out complete structre definition of dma_iommu_mapping
to include/linux/iommu-helper.h

This is done since arm iommu's dma-mapping arch independent code,
needs to be moved out to lib/iommu-helper.c, this means
dma_iommu_mapping will be arch independent and later other archs
can make use of it.
Will that really happen?  Do you have patches that do that?  I'd prefer
to not do stuff like this until you have a patch series that needs it,
otherwise this is just unneeded churn.
quoted hunk ↗ jump to hunk
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -705,6 +705,10 @@ struct device {
 	/* arch specific additions */
 	struct dev_archdata	archdata;
 
+#ifdef CONFIG_DMA_USE_IOMMU_HELPER_MAPPING
+	struct dma_iommu_mapping	*mapping;
+#endif
+
 	struct device_node	*of_node; /* associated device tree node */
 	struct acpi_dev_node	acpi_node; /* associated ACPI device node */
 
Are you sure this will not break the build on systems that enable that
option, yet do not include iommu-helper.h?

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help