Commit f2042ed2 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel

iommu/dma: Make header private

Now that dma-iommu.h only contains internal interfaces, make it
private to the IOMMU subsytem.
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/b237e06c56a101f77af142a54b629b27aa179d22.1660668998.git.robin.murphy@arm.com
[ joro : re-add stub for iommu_dma_get_resv_regions ]
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent fa49364c
...@@ -10626,8 +10626,8 @@ L: iommu@lists.linux.dev ...@@ -10626,8 +10626,8 @@ L: iommu@lists.linux.dev
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
F: drivers/iommu/dma-iommu.c F: drivers/iommu/dma-iommu.c
F: drivers/iommu/dma-iommu.h
F: drivers/iommu/iova.c F: drivers/iommu/iova.c
F: include/linux/dma-iommu.h
F: include/linux/iova.h F: include/linux/iova.h
IOMMU SUBSYSTEM IOMMU SUBSYSTEM
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#define pr_fmt(fmt) "ACPI: VIOT: " fmt #define pr_fmt(fmt) "ACPI: VIOT: " fmt
#include <linux/acpi_viot.h> #include <linux/acpi_viot.h>
#include <linux/dma-iommu.h>
#include <linux/fwnode.h> #include <linux/fwnode.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/list.h> #include <linux/list.h>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
// Author: Inki Dae <inki.dae@samsung.com> // Author: Inki Dae <inki.dae@samsung.com>
// Author: Andrzej Hajda <a.hajda@samsung.com> // Author: Andrzej Hajda <a.hajda@samsung.com>
#include <linux/dma-iommu.h>
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <linux/dma-direct.h> #include <linux/dma-direct.h>
#include <linux/dma-iommu.h>
#include <linux/iommu-helper.h> #include <linux/iommu-helper.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/amd-iommu.h> #include <linux/amd-iommu.h>
...@@ -40,6 +39,7 @@ ...@@ -40,6 +39,7 @@
#include <asm/dma.h> #include <asm/dma.h>
#include "amd_iommu.h" #include "amd_iommu.h"
#include "../dma-iommu.h"
#include "../irq_remapping.h" #include "../irq_remapping.h"
#define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28))
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/dev_printk.h> #include <linux/dev_printk.h>
#include <linux/dma-iommu.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -33,6 +32,8 @@ ...@@ -33,6 +32,8 @@
#include <linux/swab.h> #include <linux/swab.h>
#include <linux/types.h> #include <linux/types.h>
#include "dma-iommu.h"
#define DART_MAX_STREAMS 16 #define DART_MAX_STREAMS 16
#define DART_MAX_TTBR 4 #define DART_MAX_TTBR 4
#define MAX_DARTS_PER_DEVICE 2 #define MAX_DARTS_PER_DEVICE 2
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-iommu.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/io-pgtable.h> #include <linux/io-pgtable.h>
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include "arm-smmu-v3.h" #include "arm-smmu-v3.h"
#include "../../dma-iommu.h"
#include "../../iommu-sva-lib.h" #include "../../iommu-sva-lib.h"
static bool disable_bypass = true; static bool disable_bypass = true;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/acpi_iort.h> #include <linux/acpi_iort.h>
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-iommu.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -40,6 +39,7 @@ ...@@ -40,6 +39,7 @@
#include <linux/fsl/mc.h> #include <linux/fsl/mc.h>
#include "arm-smmu.h" #include "arm-smmu.h"
#include "../../dma-iommu.h"
/* /*
* Apparently, some Qualcomm arm64 platforms which appear to expose their SMMU * Apparently, some Qualcomm arm64 platforms which appear to expose their SMMU
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/dma-direct.h> #include <linux/dma-direct.h>
#include <linux/dma-iommu.h>
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/huge_mm.h> #include <linux/huge_mm.h>
...@@ -30,6 +29,8 @@ ...@@ -30,6 +29,8 @@
#include <linux/swiotlb.h> #include <linux/swiotlb.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include "dma-iommu.h"
struct iommu_dma_msi_page { struct iommu_dma_msi_page {
struct list_head list; struct list_head list;
dma_addr_t iova; dma_addr_t iova;
......
...@@ -5,15 +5,10 @@ ...@@ -5,15 +5,10 @@
#ifndef __DMA_IOMMU_H #ifndef __DMA_IOMMU_H
#define __DMA_IOMMU_H #define __DMA_IOMMU_H
#include <linux/errno.h> #include <linux/iommu.h>
#include <linux/types.h>
#ifdef CONFIG_IOMMU_DMA #ifdef CONFIG_IOMMU_DMA
#include <linux/dma-mapping.h>
#include <linux/iommu.h>
#include <linux/msi.h>
/* Domain management interface for IOMMU drivers */
int iommu_get_dma_cookie(struct iommu_domain *domain); int iommu_get_dma_cookie(struct iommu_domain *domain);
void iommu_put_dma_cookie(struct iommu_domain *domain); void iommu_put_dma_cookie(struct iommu_domain *domain);
...@@ -21,16 +16,10 @@ int iommu_dma_init_fq(struct iommu_domain *domain); ...@@ -21,16 +16,10 @@ int iommu_dma_init_fq(struct iommu_domain *domain);
void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
void iommu_dma_free_cpu_cached_iovas(unsigned int cpu,
struct iommu_domain *domain);
extern bool iommu_dma_forcedac; extern bool iommu_dma_forcedac;
#else /* CONFIG_IOMMU_DMA */ #else /* CONFIG_IOMMU_DMA */
struct iommu_domain;
struct device;
static inline int iommu_dma_init_fq(struct iommu_domain *domain) static inline int iommu_dma_init_fq(struct iommu_domain *domain)
{ {
return -EINVAL; return -EINVAL;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/dma-direct.h> #include <linux/dma-direct.h>
#include <linux/dma-iommu.h>
#include <linux/dmi.h> #include <linux/dmi.h>
#include <linux/intel-svm.h> #include <linux/intel-svm.h>
#include <linux/memory.h> #include <linux/memory.h>
...@@ -26,6 +25,7 @@ ...@@ -26,6 +25,7 @@
#include <linux/tboot.h> #include <linux/tboot.h>
#include "iommu.h" #include "iommu.h"
#include "../dma-iommu.h"
#include "../irq_remapping.h" #include "../irq_remapping.h"
#include "../iommu-sva-lib.h" #include "../iommu-sva-lib.h"
#include "pasid.h" #include "pasid.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <linux/amba/bus.h> #include <linux/amba/bus.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/dma-iommu.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/bits.h> #include <linux/bits.h>
#include <linux/bug.h> #include <linux/bug.h>
...@@ -30,6 +29,8 @@ ...@@ -30,6 +29,8 @@
#include <linux/cc_platform.h> #include <linux/cc_platform.h>
#include <trace/events/iommu.h> #include <trace/events/iommu.h>
#include "dma-iommu.h"
static struct kset *iommu_group_kset; static struct kset *iommu_group_kset;
static DEFINE_IDA(iommu_group_ida); static DEFINE_IDA(iommu_group_ida);
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-iommu.h>
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <linux/freezer.h> #include <linux/freezer.h>
#include <linux/interval_tree.h> #include <linux/interval_tree.h>
...@@ -23,6 +22,8 @@ ...@@ -23,6 +22,8 @@
#include <uapi/linux/virtio_iommu.h> #include <uapi/linux/virtio_iommu.h>
#include "dma-iommu.h"
#define MSI_IOVA_BASE 0x8000000 #define MSI_IOVA_BASE 0x8000000
#define MSI_IOVA_LENGTH 0x100000 #define MSI_IOVA_LENGTH 0x100000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment