diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-24 13:47:05 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-03 12:38:11 -0500 |
commit | 8d7d818676d3851b3ec0c94644e760d0bfac2608 (patch) | |
tree | aa699751beffe2e9b5e15ee7ab64dd940b29379b | |
parent | f19e84824ac62d662a1d2b2b367f23b98bbd6d1d (diff) |
x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_with_sysdata()
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>
-rw-r--r-- | arch/x86/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 5 | ||||
-rw-r--r-- | arch/x86/pci/fixup.c | 6 | ||||
-rw-r--r-- | arch/x86/pci/numaq_32.c | 6 | ||||
-rw-r--r-- | arch/x86/pci/visws.c | 4 |
5 files changed, 8 insertions, 14 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 1ac6114c9ea5..4e891abf8b48 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
@@ -29,7 +29,6 @@ extern int noioapicreroute; | |||
29 | /* scan a bus after allocating a pci_sysdata for it */ | 29 | /* scan a bus after allocating a pci_sysdata for it */ |
30 | extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, | 30 | extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, |
31 | int node); | 31 | int node); |
32 | extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); | ||
33 | 32 | ||
34 | #ifdef CONFIG_PCI | 33 | #ifdef CONFIG_PCI |
35 | 34 | ||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index c47bb2288bb9..f530c7e93250 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -697,11 +697,6 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | |||
697 | return bus; | 697 | return bus; |
698 | } | 698 | } |
699 | 699 | ||
700 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) | ||
701 | { | ||
702 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); | ||
703 | } | ||
704 | |||
705 | /* | 700 | /* |
706 | * NUMA info for PCI busses | 701 | * NUMA info for PCI busses |
707 | * | 702 | * |
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index bca9e85daaa5..201833f5f1bc 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -25,9 +25,9 @@ static void pci_fixup_i450nx(struct pci_dev *d) | |||
25 | dev_dbg(&d->dev, "i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, | 25 | dev_dbg(&d->dev, "i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, |
26 | suba, subb); | 26 | suba, subb); |
27 | if (busno) | 27 | if (busno) |
28 | pci_scan_bus_with_sysdata(busno); /* Bus A */ | 28 | pcibios_scan_root(busno); /* Bus A */ |
29 | if (suba < subb) | 29 | if (suba < subb) |
30 | pci_scan_bus_with_sysdata(suba+1); /* Bus B */ | 30 | pcibios_scan_root(suba+1); /* Bus B */ |
31 | } | 31 | } |
32 | pcibios_last_bus = -1; | 32 | pcibios_last_bus = -1; |
33 | } | 33 | } |
@@ -42,7 +42,7 @@ static void pci_fixup_i450gx(struct pci_dev *d) | |||
42 | u8 busno; | 42 | u8 busno; |
43 | pci_read_config_byte(d, 0x4a, &busno); | 43 | pci_read_config_byte(d, 0x4a, &busno); |
44 | dev_info(&d->dev, "i440KX/GX host bridge; secondary bus %02x\n", busno); | 44 | dev_info(&d->dev, "i440KX/GX host bridge; secondary bus %02x\n", busno); |
45 | pci_scan_bus_with_sysdata(busno); | 45 | pcibios_scan_root(busno); |
46 | pcibios_last_bus = -1; | 46 | pcibios_last_bus = -1; |
47 | } | 47 | } |
48 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); | 48 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); |
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 72c229f9ebcf..080eb0374fff 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -135,11 +135,11 @@ static void pci_fixup_i450nx(struct pci_dev *d) | |||
135 | pxb, busno, suba, subb); | 135 | pxb, busno, suba, subb); |
136 | if (busno) { | 136 | if (busno) { |
137 | /* Bus A */ | 137 | /* Bus A */ |
138 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, busno)); | 138 | pcibios_scan_root(QUADLOCAL2BUS(quad, busno)); |
139 | } | 139 | } |
140 | if (suba < subb) { | 140 | if (suba < subb) { |
141 | /* Bus B */ | 141 | /* Bus B */ |
142 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, suba+1)); | 142 | pcibios_scan_root(QUADLOCAL2BUS(quad, suba+1)); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | pcibios_last_bus = -1; | 145 | pcibios_last_bus = -1; |
@@ -159,7 +159,7 @@ int __init pci_numaq_init(void) | |||
159 | continue; | 159 | continue; |
160 | printk("Scanning PCI bus %d for quad %d\n", | 160 | printk("Scanning PCI bus %d for quad %d\n", |
161 | QUADLOCAL2BUS(quad,0), quad); | 161 | QUADLOCAL2BUS(quad,0), quad); |
162 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, 0)); | 162 | pcibios_scan_root(QUADLOCAL2BUS(quad, 0)); |
163 | } | 163 | } |
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 3e6d2a6db866..cd9d4d1681d2 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c | |||
@@ -78,8 +78,8 @@ int __init pci_visws_init(void) | |||
78 | "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); | 78 | "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); |
79 | 79 | ||
80 | raw_pci_ops = &pci_direct_conf1; | 80 | raw_pci_ops = &pci_direct_conf1; |
81 | pci_scan_bus_with_sysdata(pci_bus0); | 81 | pcibios_scan_root(pci_bus0); |
82 | pci_scan_bus_with_sysdata(pci_bus1); | 82 | pcibios_scan_root(pci_bus1); |
83 | pci_fixup_irqs(pci_common_swizzle, visws_map_irq); | 83 | pci_fixup_irqs(pci_common_swizzle, visws_map_irq); |
84 | pcibios_resource_survey(); | 84 | pcibios_resource_survey(); |
85 | /* Request bus scan */ | 85 | /* Request bus scan */ |