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

iommu-common: move to arch/sparc

This code is only used by sparc, and all new iommu drivers should use the
drivers/iommu/ framework. Also remove the unused exports.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>

+7 -10
+1 -1
arch/sparc/include/asm/iommu_64.h
··· 17 17 #define IOPTE_WRITE 0x0000000000000002UL 18 18 19 19 #define IOMMU_NUM_CTXS 4096 20 - #include <linux/iommu-common.h> 20 + #include <asm/iommu-common.h> 21 21 22 22 struct iommu_arena { 23 23 unsigned long *map;
+1 -1
arch/sparc/kernel/Makefile
··· 59 59 60 60 obj-$(CONFIG_SPARC64) += reboot.o 61 61 obj-$(CONFIG_SPARC64) += sysfs.o 62 - obj-$(CONFIG_SPARC64) += iommu.o 62 + obj-$(CONFIG_SPARC64) += iommu.o iommu-common.o 63 63 obj-$(CONFIG_SPARC64) += central.o 64 64 obj-$(CONFIG_SPARC64) += starfire.o 65 65 obj-$(CONFIG_SPARC64) += power.o
+1 -1
arch/sparc/kernel/iommu.c
··· 14 14 #include <linux/errno.h> 15 15 #include <linux/iommu-helper.h> 16 16 #include <linux/bitmap.h> 17 - #include <linux/iommu-common.h> 17 + #include <asm/iommu-common.h> 18 18 19 19 #ifdef CONFIG_PCI 20 20 #include <linux/pci.h>
+1 -1
arch/sparc/kernel/ldc.c
··· 16 16 #include <linux/list.h> 17 17 #include <linux/init.h> 18 18 #include <linux/bitmap.h> 19 - #include <linux/iommu-common.h> 19 + #include <asm/iommu-common.h> 20 20 21 21 #include <asm/hypervisor.h> 22 22 #include <asm/iommu.h>
+1 -1
arch/sparc/kernel/pci_sun4v.c
··· 16 16 #include <linux/export.h> 17 17 #include <linux/log2.h> 18 18 #include <linux/of_device.h> 19 - #include <linux/iommu-common.h> 19 + #include <asm/iommu-common.h> 20 20 21 21 #include <asm/iommu.h> 22 22 #include <asm/irq.h>
include/linux/iommu-common.h arch/sparc/include/asm/iommu-common.h
+1 -1
lib/Makefile
··· 147 147 obj-$(CONFIG_AUDIT_COMPAT_GENERIC) += compat_audit.o 148 148 149 149 obj-$(CONFIG_SWIOTLB) += swiotlb.o 150 - obj-$(CONFIG_IOMMU_HELPER) += iommu-helper.o iommu-common.o 150 + obj-$(CONFIG_IOMMU_HELPER) += iommu-helper.o 151 151 obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o 152 152 obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) += notifier-error-inject.o 153 153 obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o
+1 -4
lib/iommu-common.c arch/sparc/kernel/iommu-common.c
··· 8 8 #include <linux/bitmap.h> 9 9 #include <linux/bug.h> 10 10 #include <linux/iommu-helper.h> 11 - #include <linux/iommu-common.h> 12 11 #include <linux/dma-mapping.h> 13 12 #include <linux/hash.h> 13 + #include <asm/iommu-common.h> 14 14 15 15 static unsigned long iommu_large_alloc = 15; 16 16 ··· 93 93 p->hint = p->start; 94 94 p->end = num_entries; 95 95 } 96 - EXPORT_SYMBOL(iommu_tbl_pool_init); 97 96 98 97 unsigned long iommu_tbl_range_alloc(struct device *dev, 99 98 struct iommu_map_table *iommu, ··· 223 224 224 225 return n; 225 226 } 226 - EXPORT_SYMBOL(iommu_tbl_range_alloc); 227 227 228 228 static struct iommu_pool *get_pool(struct iommu_map_table *tbl, 229 229 unsigned long entry) ··· 262 264 bitmap_clear(iommu->map, entry, npages); 263 265 spin_unlock_irqrestore(&(pool->lock), flags); 264 266 } 265 - EXPORT_SYMBOL(iommu_tbl_range_free);