diff options
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 13218263e66e..18f6fd1d0405 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -3402,12 +3402,6 @@ static void pnv_ioda_release_pe(struct pnv_ioda_pe *pe) | |||
3402 | struct pnv_phb *phb = pe->phb; | 3402 | struct pnv_phb *phb = pe->phb; |
3403 | struct pnv_ioda_pe *slave, *tmp; | 3403 | struct pnv_ioda_pe *slave, *tmp; |
3404 | 3404 | ||
3405 | /* Release slave PEs in compound PE */ | ||
3406 | if (pe->flags & PNV_IODA_PE_MASTER) { | ||
3407 | list_for_each_entry_safe(slave, tmp, &pe->slaves, list) | ||
3408 | pnv_ioda_release_pe(slave); | ||
3409 | } | ||
3410 | |||
3411 | list_del(&pe->list); | 3405 | list_del(&pe->list); |
3412 | switch (phb->type) { | 3406 | switch (phb->type) { |
3413 | case PNV_PHB_IODA1: | 3407 | case PNV_PHB_IODA1: |
@@ -3422,6 +3416,15 @@ static void pnv_ioda_release_pe(struct pnv_ioda_pe *pe) | |||
3422 | 3416 | ||
3423 | pnv_ioda_release_pe_seg(pe); | 3417 | pnv_ioda_release_pe_seg(pe); |
3424 | pnv_ioda_deconfigure_pe(pe->phb, pe); | 3418 | pnv_ioda_deconfigure_pe(pe->phb, pe); |
3419 | |||
3420 | /* Release slave PEs in the compound PE */ | ||
3421 | if (pe->flags & PNV_IODA_PE_MASTER) { | ||
3422 | list_for_each_entry_safe(slave, tmp, &pe->slaves, list) { | ||
3423 | list_del(&slave->list); | ||
3424 | pnv_ioda_free_pe(slave); | ||
3425 | } | ||
3426 | } | ||
3427 | |||
3425 | pnv_ioda_free_pe(pe); | 3428 | pnv_ioda_free_pe(pe); |
3426 | } | 3429 | } |
3427 | 3430 | ||