aboutsummaryrefslogtreecommitdiff
path: root/core/pci.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-03-30 10:05:29 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-31 16:57:07 +1100
commit2e831a162653d53cb3e69cd98d75f0129752a643 (patch)
tree2a6e5d4c0f36a78f3fea410ea07a3bea98b19254 /core/pci.c
parentbb74665672d990b6676138efc1b07067df3806de (diff)
downloadskiboot-2e831a162653d53cb3e69cd98d75f0129752a643.zip
skiboot-2e831a162653d53cb3e69cd98d75f0129752a643.tar.gz
skiboot-2e831a162653d53cb3e69cd98d75f0129752a643.tar.bz2
core/pci: Add phb->ops->device_remove
This adds another PHB callback (device_remove()), corresponding to device_init(). With it, the PHB3 layer can receive notification upon PCI topology changes. This functionality will be used by the subsequent patches. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r--core/pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/pci.c b/core/pci.c
index 6864e6f..a8b4b69 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -526,6 +526,9 @@ void pci_remove_bus(struct phb *phb, struct list_head *list)
list_for_each_safe(list, pd, tmp, link) {
pci_remove_bus(phb, &pd->children);
+ if (phb->ops->device_remove)
+ phb->ops->device_remove(phb, pd);
+
/* Release device node and PCI slot */
if (pd->dn)
dt_free(pd->dn);