x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_with_sysdata()
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Jan 2014 18:47:05 +0000 (11:47 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 3 Feb 2014 17:38:11 +0000 (10:38 -0700)
pci_scan_bus_with_sysdata() and pcibios_scan_root() are quite similar:

  pci_scan_bus_with_sysdata
    pci_scan_bus_on_node(..., &pci_root_ops, -1)

  pcibios_scan_root
    pci_scan_bus_on_node(..., &pci_root_ops, get_mp_bus_to_node(busnum))

get_mp_bus_to_node() returns -1 if it couldn't find the node number, so
this removes pci_scan_bus_with_sysdata() and uses pcibios_scan_root()
instead.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/include/asm/pci.h
arch/x86/pci/common.c
arch/x86/pci/fixup.c
arch/x86/pci/numaq_32.c
arch/x86/pci/visws.c

index 1ac6114c9ea591e73c50d53d47d45592755d8c96..4e891abf8b488a4eb8f729212b5e159a8f92f017 100644 (file)
@@ -29,7 +29,6 @@ extern int noioapicreroute;
 /* scan a bus after allocating a pci_sysdata for it */
 extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
                                            int node);
-extern struct pci_bus *pci_scan_bus_with_sysdata(int busno);
 
 #ifdef CONFIG_PCI
 
index c47bb2288bb9226ad4180130f1db2b57c5173d8a..f530c7e9325056b1cf2854f230d5dd9f382425f2 100644 (file)
@@ -697,11 +697,6 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
        return bus;
 }
 
-struct pci_bus *pci_scan_bus_with_sysdata(int busno)
-{
-       return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
-}
-
 /*
  * NUMA info for PCI busses
  *
index bca9e85daaa55d04d3e174657264920280be4636..201833f5f1bcb1a80cc1c2e632ae2d3df4c6bc60 100644 (file)
@@ -25,9 +25,9 @@ static void pci_fixup_i450nx(struct pci_dev *d)
                dev_dbg(&d->dev, "i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno,
                        suba, subb);
                if (busno)
-                       pci_scan_bus_with_sysdata(busno);       /* Bus A */
+                       pcibios_scan_root(busno);       /* Bus A */
                if (suba < subb)
-                       pci_scan_bus_with_sysdata(suba+1);      /* Bus B */
+                       pcibios_scan_root(suba+1);      /* Bus B */
        }
        pcibios_last_bus = -1;
 }
@@ -42,7 +42,7 @@ static void pci_fixup_i450gx(struct pci_dev *d)
        u8 busno;
        pci_read_config_byte(d, 0x4a, &busno);
        dev_info(&d->dev, "i440KX/GX host bridge; secondary bus %02x\n", busno);
-       pci_scan_bus_with_sysdata(busno);
+       pcibios_scan_root(busno);
        pcibios_last_bus = -1;
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx);
index 72c229f9ebcf68aca50cd7bbb5f668c009df8c5e..080eb0374fff199ce4f933a1d4a770974e9863ca 100644 (file)
@@ -135,11 +135,11 @@ static void pci_fixup_i450nx(struct pci_dev *d)
                        pxb, busno, suba, subb);
                if (busno) {
                        /* Bus A */
-                       pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, busno));
+                       pcibios_scan_root(QUADLOCAL2BUS(quad, busno));
                }
                if (suba < subb) {
                        /* Bus B */
-                       pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, suba+1));
+                       pcibios_scan_root(QUADLOCAL2BUS(quad, suba+1));
                }
        }
        pcibios_last_bus = -1;
@@ -159,7 +159,7 @@ int __init pci_numaq_init(void)
                                continue;
                        printk("Scanning PCI bus %d for quad %d\n", 
                                QUADLOCAL2BUS(quad,0), quad);
-                       pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, 0));
+                       pcibios_scan_root(QUADLOCAL2BUS(quad, 0));
                }
        return 0;
 }
index 3e6d2a6db86681d3a1731f7a7956711bdcd36e50..cd9d4d1681d28e6ec75550da99bd716d4608715e 100644 (file)
@@ -78,8 +78,8 @@ int __init pci_visws_init(void)
                "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0);
 
        raw_pci_ops = &pci_direct_conf1;
-       pci_scan_bus_with_sysdata(pci_bus0);
-       pci_scan_bus_with_sysdata(pci_bus1);
+       pcibios_scan_root(pci_bus0);
+       pcibios_scan_root(pci_bus1);
        pci_fixup_irqs(pci_common_swizzle, visws_map_irq);
        pcibios_resource_survey();
        /* Request bus scan */