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

PCI: Call dma_debug_add_bus() for pci_bus_type from PCI core

There is nothing arch-specific about PCI or dma-debug, so call
dma_debug_add_bus() from the PCI core just after registering the bus type.

Most of dma-debug is already generic; this just adds reporting of pending
dma-allocations on driver unload for arches other than powerpc, sh, and
x86.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
parent d6488ac1
...@@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask); ...@@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
static int __init dma_init(void) static int __init dma_init(void)
{ {
#ifdef CONFIG_PCI
dma_debug_add_bus(&pci_bus_type);
#endif
#ifdef CONFIG_IBMVIO #ifdef CONFIG_IBMVIO
dma_debug_add_bus(&vio_bus_type); dma_debug_add_bus(&vio_bus_type);
#endif #endif
......
...@@ -160,8 +160,6 @@ static int __init pcibios_init(void) ...@@ -160,8 +160,6 @@ static int __init pcibios_init(void)
for (hose = hose_head; hose; hose = hose->next) for (hose = hose_head; hose; hose = hose->next)
pcibios_scanbus(hose); pcibios_scanbus(hose);
dma_debug_add_bus(&pci_bus_type);
pci_initialized = 1; pci_initialized = 1;
return 0; return 0;
......
...@@ -155,9 +155,6 @@ static int __init pci_iommu_init(void) ...@@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
{ {
struct iommu_table_entry *p; struct iommu_table_entry *p;
#ifdef CONFIG_PCI
dma_debug_add_bus(&pci_bus_type);
#endif
x86_init.iommu.iommu_init(); x86_init.iommu.iommu_init();
for (p = __iommu_table; p < __iommu_table_end; p++) { for (p = __iommu_table; p < __iommu_table_end; p++) {
......
...@@ -1667,7 +1667,7 @@ static int __init pci_driver_init(void) ...@@ -1667,7 +1667,7 @@ static int __init pci_driver_init(void)
if (ret) if (ret)
return ret; return ret;
#endif #endif
dma_debug_add_bus(&pci_bus_type);
return 0; return 0;
} }
postcore_initcall(pci_driver_init); postcore_initcall(pci_driver_init);
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