powerpc/eeh: Handle multiple EEH errors
authorGavin Shan <shangw@linux.vnet.ibm.com>
Wed, 15 Jan 2014 05:16:11 +0000 (13:16 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 15 Jan 2014 06:18:58 +0000 (17:18 +1100)
commit7e4e7867b1e551b7b8f326da3604c47332972bc6
treee071befc52d4aa431b7ebba8e04685de3bf85751
parentfac515db45207718168cb55ca4d0a390e43b61af
powerpc/eeh: Handle multiple EEH errors

For one PCI error relevant OPAL event, we possibly have multiple
EEH errors for that. For example, multiple frozen PEs detected on
different PHBs. Unfortunately, we didn't cover the case. The patch
enumarates the return value from eeh_ops::next_error() and change
eeh_handle_special_event() and eeh_ops::next_error() to handle all
existing EEH errors.

As Ben pointed out, we needn't list_for_each_entry_safe() since we
are not deleting any PHB from the hose_list and the EEH serialized
lock should be held while purging EEH events. The patch covers those
suggestions as well.

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/kernel/eeh_driver.c
arch/powerpc/platforms/powernv/eeh-ioda.c