powerpc/eeh: Rename eeh_{add_to|remove_from}_parent_pe()
The naming of eeh_{add_to|remove_from}_parent_pe() doesn't really reflect what they actually do. If the PE referred to be edev->pe_config_addr already exists under that PHB then the edev is added to that PE. However, if the PE doesn't exist the a new one is created for the edev. The bulk of the implementation of eeh_add_to_parent_pe() covers that second case. Similarly, most of eeh_remove_from_parent_pe() is determining when it's safe to delete a PE. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200725081231.39076-12-oohall@gmail.com
This commit is contained in:

committed by
Michael Ellerman

parent
768a42845b
commit
d923ab7a96
@@ -1107,7 +1107,7 @@ void eeh_probe_device(struct pci_dev *dev)
|
||||
* FIXME: HEY MA, LOOK AT ME, NO LOCKING!
|
||||
*/
|
||||
if (edev->pdev && edev->pdev != dev) {
|
||||
eeh_rmv_from_parent_pe(edev);
|
||||
eeh_pe_tree_remove(edev);
|
||||
eeh_addr_cache_rmv_dev(edev->pdev);
|
||||
eeh_sysfs_remove_device(edev->pdev);
|
||||
|
||||
@@ -1186,7 +1186,7 @@ void eeh_remove_device(struct pci_dev *dev)
|
||||
edev->in_error = false;
|
||||
dev->dev.archdata.edev = NULL;
|
||||
if (!(edev->pe->state & EEH_PE_KEEP))
|
||||
eeh_rmv_from_parent_pe(edev);
|
||||
eeh_pe_tree_remove(edev);
|
||||
else
|
||||
edev->mode |= EEH_DEV_DISCONNECTED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user