aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-05-03 01:41:37 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-05-11 07:54:23 -0400
commitbd251b893d46240fc12d9fa9316d9ea6ec2b69a7 (patch)
treeac0744a64835095ac977748056cf13171de5c002
parent1e9167726c41b8d2126327379f4f82acbd548ba8 (diff)
powerpc/pci: Rename pcibios_{add, remove}_pci_devices()
This renames pcibios_{add,remove}_pci_devices() to avoid conflicts with names of the weak functions in PCI subsystem, which have the prefix "pcibios". No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h4
-rw-r--r--arch/powerpc/kernel/eeh_driver.c12
-rw-r--r--arch/powerpc/kernel/pci-hotplug.c15
-rw-r--r--drivers/pci/hotplug/rpadlpar_core.c2
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c4
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c2
6 files changed, 19 insertions, 20 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 220129f333f9..99027b8fb467 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -260,10 +260,10 @@ static inline struct eeh_dev *pdn_to_eeh_dev(struct pci_dn *pdn)
260extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn); 260extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
261 261
262/** Remove all of the PCI devices under this bus */ 262/** Remove all of the PCI devices under this bus */
263extern void pcibios_remove_pci_devices(struct pci_bus *bus); 263extern void pci_hp_remove_devices(struct pci_bus *bus);
264 264
265/** Discover new pci devices under this bus, and add them */ 265/** Discover new pci devices under this bus, and add them */
266extern void pcibios_add_pci_devices(struct pci_bus *bus); 266extern void pci_hp_add_devices(struct pci_bus *bus);
267 267
268 268
269extern void isa_bridge_find_early(struct pci_controller *hose); 269extern void isa_bridge_find_early(struct pci_controller *hose);
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index fb6207d2c604..618d13c26792 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -621,7 +621,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
621 * We don't remove the corresponding PE instances because 621 * We don't remove the corresponding PE instances because
622 * we need the information afterwords. The attached EEH 622 * we need the information afterwords. The attached EEH
623 * devices are expected to be attached soon when calling 623 * devices are expected to be attached soon when calling
624 * into pcibios_add_pci_devices(). 624 * into pci_hp_add_devices().
625 */ 625 */
626 eeh_pe_state_mark(pe, EEH_PE_KEEP); 626 eeh_pe_state_mark(pe, EEH_PE_KEEP);
627 if (bus) { 627 if (bus) {
@@ -630,7 +630,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
630 } else { 630 } else {
631 eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); 631 eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
632 pci_lock_rescan_remove(); 632 pci_lock_rescan_remove();
633 pcibios_remove_pci_devices(bus); 633 pci_hp_remove_devices(bus);
634 pci_unlock_rescan_remove(); 634 pci_unlock_rescan_remove();
635 } 635 }
636 } else if (frozen_bus) { 636 } else if (frozen_bus) {
@@ -681,7 +681,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
681 if (pe->type & EEH_PE_VF) 681 if (pe->type & EEH_PE_VF)
682 eeh_add_virt_device(edev, NULL); 682 eeh_add_virt_device(edev, NULL);
683 else 683 else
684 pcibios_add_pci_devices(bus); 684 pci_hp_add_devices(bus);
685 } else if (frozen_bus && rmv_data->removed) { 685 } else if (frozen_bus && rmv_data->removed) {
686 pr_info("EEH: Sleep 5s ahead of partial hotplug\n"); 686 pr_info("EEH: Sleep 5s ahead of partial hotplug\n");
687 ssleep(5); 687 ssleep(5);
@@ -691,7 +691,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
691 if (pe->type & EEH_PE_VF) 691 if (pe->type & EEH_PE_VF)
692 eeh_add_virt_device(edev, NULL); 692 eeh_add_virt_device(edev, NULL);
693 else 693 else
694 pcibios_add_pci_devices(frozen_bus); 694 pci_hp_add_devices(frozen_bus);
695 } 695 }
696 eeh_pe_state_clear(pe, EEH_PE_KEEP); 696 eeh_pe_state_clear(pe, EEH_PE_KEEP);
697 697
@@ -896,7 +896,7 @@ perm_error:
896 eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED); 896 eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
897 897
898 pci_lock_rescan_remove(); 898 pci_lock_rescan_remove();
899 pcibios_remove_pci_devices(frozen_bus); 899 pci_hp_remove_devices(frozen_bus);
900 pci_unlock_rescan_remove(); 900 pci_unlock_rescan_remove();
901 } 901 }
902 } 902 }
@@ -981,7 +981,7 @@ static void eeh_handle_special_event(void)
981 bus = eeh_pe_bus_get(phb_pe); 981 bus = eeh_pe_bus_get(phb_pe);
982 eeh_pe_dev_traverse(pe, 982 eeh_pe_dev_traverse(pe,
983 eeh_report_failure, NULL); 983 eeh_report_failure, NULL);
984 pcibios_remove_pci_devices(bus); 984 pci_hp_remove_devices(bus);
985 } 985 }
986 pci_unlock_rescan_remove(); 986 pci_unlock_rescan_remove();
987 } 987 }
diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kernel/pci-hotplug.c
index 59c436189f46..2d108e541819 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
+++ b/arch/powerpc/kernel/pci-hotplug.c
@@ -38,20 +38,20 @@ void pcibios_release_device(struct pci_dev *dev)
38} 38}
39 39
40/** 40/**
41 * pcibios_remove_pci_devices - remove all devices under this bus 41 * pci_hp_remove_devices - remove all devices under this bus
42 * @bus: the indicated PCI bus 42 * @bus: the indicated PCI bus
43 * 43 *
44 * Remove all of the PCI devices under this bus both from the 44 * Remove all of the PCI devices under this bus both from the
45 * linux pci device tree, and from the powerpc EEH address cache. 45 * linux pci device tree, and from the powerpc EEH address cache.
46 */ 46 */
47void pcibios_remove_pci_devices(struct pci_bus *bus) 47void pci_hp_remove_devices(struct pci_bus *bus)
48{ 48{
49 struct pci_dev *dev, *tmp; 49 struct pci_dev *dev, *tmp;
50 struct pci_bus *child_bus; 50 struct pci_bus *child_bus;
51 51
52 /* First go down child busses */ 52 /* First go down child busses */
53 list_for_each_entry(child_bus, &bus->children, node) 53 list_for_each_entry(child_bus, &bus->children, node)
54 pcibios_remove_pci_devices(child_bus); 54 pci_hp_remove_devices(child_bus);
55 55
56 pr_debug("PCI: Removing devices on bus %04x:%02x\n", 56 pr_debug("PCI: Removing devices on bus %04x:%02x\n",
57 pci_domain_nr(bus), bus->number); 57 pci_domain_nr(bus), bus->number);
@@ -60,11 +60,10 @@ void pcibios_remove_pci_devices(struct pci_bus *bus)
60 pci_stop_and_remove_bus_device(dev); 60 pci_stop_and_remove_bus_device(dev);
61 } 61 }
62} 62}
63 63EXPORT_SYMBOL_GPL(pci_hp_remove_devices);
64EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
65 64
66/** 65/**
67 * pcibios_add_pci_devices - adds new pci devices to bus 66 * pci_hp_add_devices - adds new pci devices to bus
68 * @bus: the indicated PCI bus 67 * @bus: the indicated PCI bus
69 * 68 *
70 * This routine will find and fixup new pci devices under 69 * This routine will find and fixup new pci devices under
@@ -74,7 +73,7 @@ EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
74 * is how this routine differs from other, similar pcibios 73 * is how this routine differs from other, similar pcibios
75 * routines.) 74 * routines.)
76 */ 75 */
77void pcibios_add_pci_devices(struct pci_bus * bus) 76void pci_hp_add_devices(struct pci_bus *bus)
78{ 77{
79 int slotno, mode, pass, max; 78 int slotno, mode, pass, max;
80 struct pci_dev *dev; 79 struct pci_dev *dev;
@@ -114,4 +113,4 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
114 } 113 }
115 pcibios_finish_adding_to_bus(bus); 114 pcibios_finish_adding_to_bus(bus);
116} 115}
117EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); 116EXPORT_SYMBOL_GPL(pci_hp_add_devices);
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index b46b57d870fc..b770d6de815a 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -380,7 +380,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
380 } 380 }
381 381
382 /* Remove all devices below slot */ 382 /* Remove all devices below slot */
383 pcibios_remove_pci_devices(bus); 383 pci_hp_remove_devices(bus);
384 384
385 /* Unmap PCI IO space */ 385 /* Unmap PCI IO space */
386 if (pcibios_unmap_io_space(bus)) { 386 if (pcibios_unmap_io_space(bus)) {
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 611f6056221a..8d132024f06e 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -404,7 +404,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
404 404
405 if (state == PRESENT) { 405 if (state == PRESENT) {
406 pci_lock_rescan_remove(); 406 pci_lock_rescan_remove();
407 pcibios_add_pci_devices(slot->bus); 407 pci_hp_add_devices(slot->bus);
408 pci_unlock_rescan_remove(); 408 pci_unlock_rescan_remove();
409 slot->state = CONFIGURED; 409 slot->state = CONFIGURED;
410 } else if (state == EMPTY) { 410 } else if (state == EMPTY) {
@@ -426,7 +426,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
426 return -EINVAL; 426 return -EINVAL;
427 427
428 pci_lock_rescan_remove(); 428 pci_lock_rescan_remove();
429 pcibios_remove_pci_devices(slot->bus); 429 pci_hp_remove_devices(slot->bus);
430 pci_unlock_rescan_remove(); 430 pci_unlock_rescan_remove();
431 vm_unmap_aliases(); 431 vm_unmap_aliases();
432 432
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 7836d6913e67..137a8924adc5 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -116,7 +116,7 @@ int rpaphp_enable_slot(struct slot *slot)
116 } 116 }
117 117
118 if (list_empty(&bus->devices)) 118 if (list_empty(&bus->devices))
119 pcibios_add_pci_devices(bus); 119 pci_hp_add_devices(bus);
120 120
121 if (!list_empty(&bus->devices)) { 121 if (!list_empty(&bus->devices)) {
122 info->adapter_status = CONFIGURED; 122 info->adapter_status = CONFIGURED;