/* We cannot to remove a root bus that has children */ if (!(list_empty(&b->children) && list_empty(&b->devices))) return -EBUSY;
/* We -know- there aren't any child devices anymore at this stage * and thus, we can safely unmap the IO space as it's not in use
*/
res = &phb->io_resource; if (res->flags & IORESOURCE_IO) {
rc = pcibios_unmap_io_space(b); if (rc) {
printk(KERN_ERR "%s: failed to unmap IO on bus %s\n",
__func__, b->name); return 1;
}
}
ppc_iommu_unregister_device(phb);
pseries_msi_free_domains(phb);
/* Keep a reference so phb isn't freed yet */
get_device(&host_bridge->dev);
/* Remove the PCI bus and unregister the bridge device from sysfs */
phb->bus = NULL;
pci_remove_bus(b);
host_bridge->bus = NULL;
device_unregister(&host_bridge->dev);
/* Now release the IO resource */ if (res->flags & IORESOURCE_IO)
release_resource(res);
/* Release memory resources */ for (i = 0; i < 3; ++i) {
res = &phb->mem_resources[i]; if (!(res->flags & IORESOURCE_MEM)) continue;
release_resource(res);
}
/* * The pci_controller data structure is freed by * the pcibios_free_controller_deferred() callback; * see pseries_root_bridge_prepare().
*/
put_device(&host_bridge->dev);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.