Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631547 > unrolled thread

[PATCH 0/4] iommu: Header file cleanups

Started byJoerg Roedel <joro@8bytes.org>
First post2017-04-26 17:50 +0200
Last post2017-04-26 17:50 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] iommu: Header file cleanups Joerg Roedel <joro@8bytes.org> - 2017-04-26 17:50 +0200
    [PATCH 3/4] iommu: Remove pci.h include from trace/events/iommu.h Joerg Roedel <joro@8bytes.org> - 2017-04-26 17:50 +0200
    [PATCH 1/4] iommu: Include device.h in iommu.h Joerg Roedel <joro@8bytes.org> - 2017-04-26 17:50 +0200

#1631547 — [PATCH 0/4] iommu: Header file cleanups

FromJoerg Roedel <joro@8bytes.org>
Date2017-04-26 17:50 +0200
Subject[PATCH 0/4] iommu: Header file cleanups
Message-ID<tAxmx-4e9-9@gated-at.bofh.it>
Hi,

here is a small patch-set to remove some header dependencies
from the IOMMU header files. The linux/iommu.h file does not
include linux/pci.h and the iommu trace-event headers
anymore.

For this the report_iommu_fault function was moved to
iommu.c and the place relying on above includes were fixed.

Please review.

Thanks,

	Joerg

Joerg Roedel (4):
  iommu: Include device.h in iommu.h
  iommu: Move report_iommu_fault() to iommu.c
  iommu: Remove pci.h include from trace/events/iommu.h
  iommu: Remove trace-events include from iommu.h

 arch/arm64/mm/dma-mapping.c              |  1 +
 drivers/iommu/fsl_pamu.h                 |  1 +
 drivers/iommu/iommu.c                    | 42 ++++++++++++++++++++++++++++
 drivers/iommu/rockchip-iommu.c           |  1 +
 drivers/iommu/tegra-smmu.c               |  1 +
 drivers/media/platform/mtk-vpu/mtk_vpu.c |  1 +
 include/linux/dma-iommu.h                |  1 +
 include/linux/iommu.h                    | 47 ++++----------------------------
 include/trace/events/iommu.h             |  1 -
 9 files changed, 53 insertions(+), 43 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1631550 — [PATCH 3/4] iommu: Remove pci.h include from trace/events/iommu.h

FromJoerg Roedel <joro@8bytes.org>
Date2017-04-26 17:50 +0200
Subject[PATCH 3/4] iommu: Remove pci.h include from trace/events/iommu.h
Message-ID<tAxmy-4e9-29@gated-at.bofh.it>
In reply to#1631547
From: Joerg Roedel <jroedel@suse.de>

The include file does not need any PCI specifics, so remove
that include. Also fix the places that relied on it.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 arch/arm64/mm/dma-mapping.c    | 1 +
 drivers/iommu/fsl_pamu.h       | 1 +
 drivers/iommu/rockchip-iommu.c | 1 +
 drivers/iommu/tegra-smmu.c     | 1 +
 include/linux/dma-iommu.h      | 1 +
 include/trace/events/iommu.h   | 1 -
 6 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 81cdb2e..982f85b 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -28,6 +28,7 @@
 #include <linux/dma-contiguous.h>
 #include <linux/vmalloc.h>
 #include <linux/swiotlb.h>
+#include <linux/pci.h>
 
 #include <asm/cacheflush.h>
 
diff --git a/drivers/iommu/fsl_pamu.h b/drivers/iommu/fsl_pamu.h
index aab723f..c3434f2 100644
--- a/drivers/iommu/fsl_pamu.h
+++ b/drivers/iommu/fsl_pamu.h
@@ -20,6 +20,7 @@
 #define __FSL_PAMU_H
 
 #include <linux/iommu.h>
+#include <linux/pci.h>
 
 #include <asm/fsl_pamu_stash.h>
 
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 9afcbf7..0ba303a 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -8,6 +8,7 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/dma-iommu.h>
+#include <linux/dma-mapping.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 9305964..eeb19f5 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -15,6 +15,7 @@
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/dma-mapping.h>
 
 #include <soc/tegra/ahb.h>
 #include <soc/tegra/mc.h>
diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h
index 5725c94..abd9465 100644
--- a/include/linux/dma-iommu.h
+++ b/include/linux/dma-iommu.h
@@ -20,6 +20,7 @@
 #include <asm/errno.h>
 
 #ifdef CONFIG_IOMMU_DMA
+#include <linux/dma-mapping.h>
 #include <linux/iommu.h>
 #include <linux/msi.h>
 
diff --git a/include/trace/events/iommu.h b/include/trace/events/iommu.h
index 2c7befb..99254ed 100644
--- a/include/trace/events/iommu.h
+++ b/include/trace/events/iommu.h
@@ -11,7 +11,6 @@
 #define _TRACE_IOMMU_H
 
 #include <linux/tracepoint.h>
-#include <linux/pci.h>
 
 struct device;
 
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1631551 — [PATCH 1/4] iommu: Include device.h in iommu.h

FromJoerg Roedel <joro@8bytes.org>
Date2017-04-26 17:50 +0200
Subject[PATCH 1/4] iommu: Include device.h in iommu.h
Message-ID<tAxmy-4e9-31@gated-at.bofh.it>
In reply to#1631547
From: Joerg Roedel <jroedel@suse.de>

We make use of 'struct device' in iommu.h, so include
device.h to make it available explicitly.

Re-order the other headers while at it.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 include/linux/iommu.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 2e4de0d..0232104 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -19,11 +19,13 @@
 #ifndef __LINUX_IOMMU_H
 #define __LINUX_IOMMU_H
 
+#include <linux/scatterlist.h>
+#include <linux/device.h>
+#include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/of.h>
-#include <linux/types.h>
-#include <linux/scatterlist.h>
+
 #include <trace/events/iommu.h>
 
 #define IOMMU_READ	(1 << 0)
-- 
1.9.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web