aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-10 04:02:20 -0400
committerIngo Molnar <mingo@kernel.org>2019-04-24 07:12:05 -0400
commit15854edd193ae5d9daf8f50ce5f9f1724cebe344 (patch)
tree41149b749780d598928ee6025aa268fdc20374ca
parenta5881bea88616e3aacf521dbdbe0e323257aaba1 (diff)
x86/pci: Clean up usage of X86_DEV_DMA_OPS
We have supported per-device dma_map_ops in generic code for a long time, and this symbol just guards the inclusion of the dma_map_ops registry used for vmd. Stop enabling it for anything but vmd. No change in functionality intended. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20190410080220.21705-3-hch@lst.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--drivers/misc/mic/Kconfig4
-rw-r--r--drivers/pci/controller/Kconfig1
-rw-r--r--drivers/pci/controller/vmd.c7
4 files changed, 3 insertions, 12 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7f93e013e6db..60f6459344bc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -28,7 +28,6 @@ config X86_64
28 select MODULES_USE_ELF_RELA 28 select MODULES_USE_ELF_RELA
29 select NEED_DMA_MAP_STATE 29 select NEED_DMA_MAP_STATE
30 select SWIOTLB 30 select SWIOTLB
31 select X86_DEV_DMA_OPS
32 select ARCH_HAS_SYSCALL_WRAPPER 31 select ARCH_HAS_SYSCALL_WRAPPER
33 32
34# 33#
@@ -703,7 +702,6 @@ config STA2X11
703 bool "STA2X11 Companion Chip Support" 702 bool "STA2X11 Companion Chip Support"
704 depends on X86_32_NON_STANDARD && PCI 703 depends on X86_32_NON_STANDARD && PCI
705 select ARCH_HAS_PHYS_TO_DMA 704 select ARCH_HAS_PHYS_TO_DMA
706 select X86_DEV_DMA_OPS
707 select SWIOTLB 705 select SWIOTLB
708 select MFD_STA2X11 706 select MFD_STA2X11
709 select GPIOLIB 707 select GPIOLIB
@@ -2883,7 +2881,6 @@ config HAVE_ATOMIC_IOMAP
2883 2881
2884config X86_DEV_DMA_OPS 2882config X86_DEV_DMA_OPS
2885 bool 2883 bool
2886 depends on X86_64 || STA2X11
2887 2884
2888config HAVE_GENERIC_GUP 2885config HAVE_GENERIC_GUP
2889 def_bool y 2886 def_bool y
diff --git a/drivers/misc/mic/Kconfig b/drivers/misc/mic/Kconfig
index 242dcee14689..6736f72cc14a 100644
--- a/drivers/misc/mic/Kconfig
+++ b/drivers/misc/mic/Kconfig
@@ -4,7 +4,7 @@ comment "Intel MIC Bus Driver"
4 4
5config INTEL_MIC_BUS 5config INTEL_MIC_BUS
6 tristate "Intel MIC Bus Driver" 6 tristate "Intel MIC Bus Driver"
7 depends on 64BIT && PCI && X86 && X86_DEV_DMA_OPS 7 depends on 64BIT && PCI && X86
8 help 8 help
9 This option is selected by any driver which registers a 9 This option is selected by any driver which registers a
10 device or driver on the MIC Bus, such as CONFIG_INTEL_MIC_HOST, 10 device or driver on the MIC Bus, such as CONFIG_INTEL_MIC_HOST,
@@ -21,7 +21,7 @@ comment "SCIF Bus Driver"
21 21
22config SCIF_BUS 22config SCIF_BUS
23 tristate "SCIF Bus Driver" 23 tristate "SCIF Bus Driver"
24 depends on 64BIT && PCI && X86 && X86_DEV_DMA_OPS 24 depends on 64BIT && PCI && X86
25 help 25 help
26 This option is selected by any driver which registers a 26 This option is selected by any driver which registers a
27 device or driver on the SCIF Bus, such as CONFIG_INTEL_MIC_HOST 27 device or driver on the SCIF Bus, such as CONFIG_INTEL_MIC_HOST
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 6012f3059acd..011c57cae4b0 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -267,6 +267,7 @@ config PCIE_TANGO_SMP8759
267 267
268config VMD 268config VMD
269 depends on PCI_MSI && X86_64 && SRCU 269 depends on PCI_MSI && X86_64 && SRCU
270 select X86_DEV_DMA_OPS
270 tristate "Intel Volume Management Device Driver" 271 tristate "Intel Volume Management Device Driver"
271 ---help--- 272 ---help---
272 Adds support for the Intel Volume Management Device (VMD). VMD is a 273 Adds support for the Intel Volume Management Device (VMD). VMD is a
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index cf6816b55b5e..999a5509e57e 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -95,10 +95,8 @@ struct vmd_dev {
95 struct irq_domain *irq_domain; 95 struct irq_domain *irq_domain;
96 struct pci_bus *bus; 96 struct pci_bus *bus;
97 97
98#ifdef CONFIG_X86_DEV_DMA_OPS
99 struct dma_map_ops dma_ops; 98 struct dma_map_ops dma_ops;
100 struct dma_domain dma_domain; 99 struct dma_domain dma_domain;
101#endif
102}; 100};
103 101
104static inline struct vmd_dev *vmd_from_bus(struct pci_bus *bus) 102static inline struct vmd_dev *vmd_from_bus(struct pci_bus *bus)
@@ -293,7 +291,6 @@ static struct msi_domain_info vmd_msi_domain_info = {
293 .chip = &vmd_msi_controller, 291 .chip = &vmd_msi_controller,
294}; 292};
295 293
296#ifdef CONFIG_X86_DEV_DMA_OPS
297/* 294/*
298 * VMD replaces the requester ID with its own. DMA mappings for devices in a 295 * VMD replaces the requester ID with its own. DMA mappings for devices in a
299 * VMD domain need to be mapped for the VMD, not the device requiring 296 * VMD domain need to be mapped for the VMD, not the device requiring
@@ -438,10 +435,6 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
438 add_dma_domain(domain); 435 add_dma_domain(domain);
439} 436}
440#undef ASSIGN_VMD_DMA_OPS 437#undef ASSIGN_VMD_DMA_OPS
441#else
442static void vmd_teardown_dma_ops(struct vmd_dev *vmd) {}
443static void vmd_setup_dma_ops(struct vmd_dev *vmd) {}
444#endif
445 438
446static char __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus, 439static char __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus,
447 unsigned int devfn, int reg, int len) 440 unsigned int devfn, int reg, int len)