summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci-ioda.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-11-12 13:36:10 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2014-11-14 17:24:25 +1100
commitec8e4e9d3d83b7a973477c2cb4831511b0eec06e (patch)
treea8409156326d0bd40e320b4c8b8a91144134cf41 /arch/powerpc/platforms/powernv/pci-ioda.c
parent4773f76b61e5cbf41ad514978d9338d8a7ed49e1 (diff)
downloadblackbird-op-linux-ec8e4e9d3d83b7a973477c2cb4831511b0eec06e.tar.gz
blackbird-op-linux-ec8e4e9d3d83b7a973477c2cb4831511b0eec06e.zip
powerpc/powernv: Bail upon invalid master PE
When freezing compound PEs in pnv_ioda_freeze_pe(), we should bail upon illegal master PE. We needn't freeze slave PE because it should have been put into frozen state by hardware. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci-ioda.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 762ca14228ea..d03503515692 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -373,7 +373,9 @@ static void pnv_ioda_freeze_pe(struct pnv_phb *phb, int pe_no)
/* Fetch master PE */
if (pe->flags & PNV_IODA_PE_SLAVE) {
pe = pe->master;
- WARN_ON(!pe || !(pe->flags & PNV_IODA_PE_MASTER));
+ if (WARN_ON(!pe || !(pe->flags & PNV_IODA_PE_MASTER)))
+ return;
+
pe_no = pe->pe_number;
}
OpenPOWER on IntegriCloud