powerpc/powernv: Rework EEH reset
authorGavin Shan <shangw@linux.vnet.ibm.com>
Wed, 12 Feb 2014 07:24:54 +0000 (15:24 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 17 Feb 2014 00:19:38 +0000 (11:19 +1100)
commit5b2e198e50f6ba57081586b853163ea1bb95f1a8
tree6c9e5a60e96ac81a9ebe7157609b4c9970d389d6
parent24b659a13866b935eca72748ce725279bd3c4466
powerpc/powernv: Rework EEH reset

When doing reset in order to recover the affected PE, we issue
hot reset on PE primary bus if it's not root bus. Otherwise, we
issue hot or fundamental reset on root port or PHB accordingly.
For the later case, we didn't cover the situation where PE only
includes root port and it potentially causes kernel crash upon
EEH error to the PE.

The patch reworks the logic of EEH reset to improve the code
readability and also avoid the kernel crash.

Cc: stable@vger.kernel.org
Reported-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/eeh-ioda.c