powerpc/eeh: Introduce EEH_PE_INVALID type PE
authorGavin Shan <shangw@linux.vnet.ibm.com>
Tue, 11 Sep 2012 19:16:16 +0000 (19:16 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 18 Sep 2012 05:02:49 +0000 (15:02 +1000)
commit5efc3ad7325d81b5a8e09bc14d5e21ce7272d934
treeff0a1f68d7aeabddd8c5e9cd2b8070ccbd3749da
parentddadb6b8e88979a00ac44fba9c92896eec113bd1
powerpc/eeh: Introduce EEH_PE_INVALID type PE

When EEH error happens on the PE whose PCI devices don't have
attached drivers. In function eeh_handle_event(), the default
value PCI_ERS_RESULT_NONE will be returned after iterating all
drivers of those PCI devices belonging to the PE. Actually, we
don't have installed drivers for the PCI devices. Under the
circumstance, we will remove the corresponding PCI bus of the PE,
including the associated EEH devices and PE instance. However,
we still need the information stored in the PE instance to do PE
reset after that. So it's unsafe to free the PE instance.

The patch introduces EEH_PE_INVALID type PE to address the issue.
When the PCI bus and the corresponding attached EEH devices are
removed, we will mark the PE as EEH_PE_INVALID. At later point,
the PE will be changed to EEH_PE_DEVICE or EEH_PE_BUS when the
corresponding EEH devices are attached again.

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