Skip to content

Commit 2d0953f

Browse files
oohalmpe
authored andcommitted
powerpc/eeh: Remove eeh_add_device_tree_late()
On pseries and PowerNV pcibios_bus_add_device() calls eeh_add_device_late() so there's no need to do a separate tree traversal to bind the eeh_dev and pci_dev together setting up the PHB at boot. As a result we can remove eeh_add_device_tree_late(). Reviewed-by: Sam Bobroff <[email protected]> Signed-off-by: Oliver O'Halloran <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8645aaa commit 2d0953f

File tree

4 files changed

+0
-34
lines changed

4 files changed

+0
-34
lines changed

arch/powerpc/include/asm/eeh.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ void eeh_addr_cache_init(void);
304304
void eeh_add_device_early(struct pci_dn *);
305305
void eeh_add_device_tree_early(struct pci_dn *);
306306
void eeh_add_device_late(struct pci_dev *);
307-
void eeh_add_device_tree_late(struct pci_bus *);
308307
void eeh_remove_device(struct pci_dev *);
309308
int eeh_unfreeze_pe(struct eeh_pe *pe);
310309
int eeh_pe_reset_and_recover(struct eeh_pe *pe);
@@ -365,8 +364,6 @@ static inline void eeh_add_device_tree_early(struct pci_dn *pdn) { }
365364

366365
static inline void eeh_add_device_late(struct pci_dev *dev) { }
367366

368-
static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
369-
370367
static inline void eeh_remove_device(struct pci_dev *dev) { }
371368

372369
#define EEH_POSSIBLE_ERROR(val, type) (0)

arch/powerpc/kernel/eeh.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,31 +1213,6 @@ void eeh_add_device_late(struct pci_dev *dev)
12131213
eeh_sysfs_add_device(dev);
12141214
}
12151215

1216-
/**
1217-
* eeh_add_device_tree_late - Perform EEH initialization for the indicated PCI bus
1218-
* @bus: PCI bus
1219-
*
1220-
* This routine must be used to perform EEH initialization for PCI
1221-
* devices which are attached to the indicated PCI bus. The PCI bus
1222-
* is added after system boot through hotplug or dlpar.
1223-
*/
1224-
void eeh_add_device_tree_late(struct pci_bus *bus)
1225-
{
1226-
struct pci_dev *dev;
1227-
1228-
if (eeh_has_flag(EEH_FORCE_DISABLED))
1229-
return;
1230-
list_for_each_entry(dev, &bus->devices, bus_list) {
1231-
eeh_add_device_late(dev);
1232-
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
1233-
struct pci_bus *subbus = dev->subordinate;
1234-
if (subbus)
1235-
eeh_add_device_tree_late(subbus);
1236-
}
1237-
}
1238-
}
1239-
EXPORT_SYMBOL_GPL(eeh_add_device_tree_late);
1240-
12411216
/**
12421217
* eeh_remove_device - Undo EEH setup for the indicated pci device
12431218
* @dev: pci device to be removed

arch/powerpc/kernel/of_platform.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ static int of_pci_phb_probe(struct platform_device *dev)
8080
*/
8181
pcibios_claim_one_bus(phb->bus);
8282

83-
/* Finish EEH setup */
84-
eeh_add_device_tree_late(phb->bus);
85-
8683
/* Add probed PCI devices to the device model */
8784
pci_bus_add_devices(phb->bus);
8885

arch/powerpc/kernel/pci-common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,9 +1399,6 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
13991399
pci_assign_unassigned_bus_resources(bus);
14001400
}
14011401

1402-
/* Fixup EEH */
1403-
eeh_add_device_tree_late(bus);
1404-
14051402
/* Add new devices to global lists. Register in proc, sysfs. */
14061403
pci_bus_add_devices(bus);
14071404
}

0 commit comments

Comments
 (0)