powerpc/powernv: Use dev-node in PCI config accessors
authorGavin Shan <shangw@linux.vnet.ibm.com>
Thu, 27 Jun 2013 05:46:48 +0000 (13:46 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 01:10:33 +0000 (11:10 +1000)
commit9bf41be6737327b7c06cd3f210a0cb599f4aa790
tree5b1975aad28df78f6d0dbf58e37f67cc94e808fa
parenteeb6361fdd3df59c1741522b3d8102f0f5efdd88
powerpc/powernv: Use dev-node in PCI config accessors

Currently, we're using the combo (PCI bus + devfn) in the PCI
config accessors and PCI config accessors in EEH depends on them.
However, it's not safe to refer the PCI bus which might have been
removed during hotplug. So we're using device node in the PCI
config accessors and the corresponding backends just reuse them.

The patch also fix one potential risk: We possiblly have frozen
PE during the early PCI probe time, but we haven't setup the PE
mapping yet. So the errors should be counted to PE#0.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/pci.h