powerpc/eeh: Fix PE location code
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 2 Dec 2015 05:25:32 +0000 (16:25 +1100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:23 +0000 (15:45 -0500)
commit329d4fd5f2af659d62fa6f6cea72233c7e033e9a
treeb315a0ad205d21c081d77e468a8d56a0e50f6266
parentbd6d701606119bbbc3b55a064a53c6789a1acab6
powerpc/eeh: Fix PE location code

[ Upstream commit 7e56f627768da4e6480986b5145dc3422bc448a5 ]

In eeh_pe_loc_get(), the PE location code is retrieved from the
"ibm,loc-code" property of the device node for the bridge of the
PE's primary bus. It's not correct because the property indicates
the parent PE's location code.

This reads the correct PE location code from "ibm,io-base-loc-code"
or "ibm,slot-location-code" property of PE parent bus's device node.

Cc: stable@vger.kernel.org # v3.16+
Fixes: 357b2f3dd9b7 ("powerpc/eeh: Dump PE location code")
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Tested-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/powerpc/kernel/eeh_pe.c