OSDN Git Service

x86/PCI: Remove X86_DEV_DMA_OPS
authorChristoph Hellwig <hch@lst.de>
Tue, 21 Jan 2020 13:37:51 +0000 (06:37 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Jan 2020 21:00:35 +0000 (15:00 -0600)
There are no users of X86_DEV_DMA_OPS left, so remove the code.

Link: https://lore.kernel.org/r/1579613871-301529-8-git-send-email-jonathan.derrick@intel.com
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
arch/x86/Kconfig
arch/x86/include/asm/device.h
arch/x86/pci/common.c

index 5e89499..77f9426 100644 (file)
@@ -2955,9 +2955,6 @@ config HAVE_ATOMIC_IOMAP
        def_bool y
        depends on X86_32
 
-config X86_DEV_DMA_OPS
-       bool
-
 source "drivers/firmware/Kconfig"
 
 source "arch/x86/kvm/Kconfig"
index 5e12c63..7e31f7f 100644 (file)
@@ -8,16 +8,6 @@ struct dev_archdata {
 #endif
 };
 
-#if defined(CONFIG_X86_DEV_DMA_OPS) && defined(CONFIG_PCI_DOMAINS)
-struct dma_domain {
-       struct list_head node;
-       const struct dma_map_ops *dma_ops;
-       int domain_nr;
-};
-void add_dma_domain(struct dma_domain *domain);
-void del_dma_domain(struct dma_domain *domain);
-#endif
-
 struct pdev_archdata {
 };
 
index fe21a5c..df1d959 100644 (file)
@@ -625,43 +625,6 @@ unsigned int pcibios_assign_all_busses(void)
        return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
 }
 
-#if defined(CONFIG_X86_DEV_DMA_OPS) && defined(CONFIG_PCI_DOMAINS)
-static LIST_HEAD(dma_domain_list);
-static DEFINE_SPINLOCK(dma_domain_list_lock);
-
-void add_dma_domain(struct dma_domain *domain)
-{
-       spin_lock(&dma_domain_list_lock);
-       list_add(&domain->node, &dma_domain_list);
-       spin_unlock(&dma_domain_list_lock);
-}
-EXPORT_SYMBOL_GPL(add_dma_domain);
-
-void del_dma_domain(struct dma_domain *domain)
-{
-       spin_lock(&dma_domain_list_lock);
-       list_del(&domain->node);
-       spin_unlock(&dma_domain_list_lock);
-}
-EXPORT_SYMBOL_GPL(del_dma_domain);
-
-static void set_dma_domain_ops(struct pci_dev *pdev)
-{
-       struct dma_domain *domain;
-
-       spin_lock(&dma_domain_list_lock);
-       list_for_each_entry(domain, &dma_domain_list, node) {
-               if (pci_domain_nr(pdev->bus) == domain->domain_nr) {
-                       pdev->dev.dma_ops = domain->dma_ops;
-                       break;
-               }
-       }
-       spin_unlock(&dma_domain_list_lock);
-}
-#else
-static void set_dma_domain_ops(struct pci_dev *pdev) {}
-#endif
-
 static void set_dev_domain_options(struct pci_dev *pdev)
 {
        if (is_vmd(pdev->bus))
@@ -697,7 +660,6 @@ int pcibios_add_device(struct pci_dev *dev)
                pa_data = data->next;
                memunmap(data);
        }
-       set_dma_domain_ops(dev);
        set_dev_domain_options(dev);
        return 0;
 }