powerpc/PCI: Fix lookup of linux,pci-probe-only property
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 4 Sep 2015 16:50:10 +0000 (17:50 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 17 Sep 2015 17:21:02 +0000 (12:21 -0500)
commit705a7b474ed929a8c86733ad230dd9c820e84a7b
tree95bb9586b86e121d5015d7c4d59754731a5d61c8
parenta07245d14fcb0ac760bfc60fc3483b0619998867
powerpc/PCI: Fix lookup of linux,pci-probe-only property

When find_and_init_phbs() looks for the probe-only property, it seems to
trust the firmware to be correctly written, and assumes that there is a
parameter to the property.

It is conceivable that the firmware could not be that perfect, and it could
expose this property naked (at least one arm64 platform seems to exhibit
this exact behaviour).  The setup code the ends up making a decision based
on whatever the property pointer points to, which is likely to be junk.

Instead, switch to the common of_pci.c implementation that doesn't suffer
from this problem and ignore the property if the firmware couldn't make up
its mind.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/setup.c