Commit dab01984 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Bjorn Helgaas

x86/PCI: Remove X86_DEV_DMA_OPS

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.comSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarJon Derrick <jonathan.derrick@intel.com>
parent 962e329d
...@@ -2955,9 +2955,6 @@ config HAVE_ATOMIC_IOMAP ...@@ -2955,9 +2955,6 @@ config HAVE_ATOMIC_IOMAP
def_bool y def_bool y
depends on X86_32 depends on X86_32
config X86_DEV_DMA_OPS
bool
source "drivers/firmware/Kconfig" source "drivers/firmware/Kconfig"
source "arch/x86/kvm/Kconfig" source "arch/x86/kvm/Kconfig"
...@@ -8,16 +8,6 @@ struct dev_archdata { ...@@ -8,16 +8,6 @@ struct dev_archdata {
#endif #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 { struct pdev_archdata {
}; };
......
...@@ -625,43 +625,6 @@ unsigned int pcibios_assign_all_busses(void) ...@@ -625,43 +625,6 @@ unsigned int pcibios_assign_all_busses(void)
return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0; 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) static void set_dev_domain_options(struct pci_dev *pdev)
{ {
if (is_vmd(pdev->bus)) if (is_vmd(pdev->bus))
...@@ -697,7 +660,6 @@ int pcibios_add_device(struct pci_dev *dev) ...@@ -697,7 +660,6 @@ int pcibios_add_device(struct pci_dev *dev)
pa_data = data->next; pa_data = data->next;
memunmap(data); memunmap(data);
} }
set_dma_domain_ops(dev);
set_dev_domain_options(dev); set_dev_domain_options(dev);
return 0; return 0;
} }
......
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