powerpc/pseries/mobility: retry partition suspend after error
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 7 Dec 2020 21:51:46 +0000 (15:51 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:40:58 +0000 (21:40 +1100)
commitaeca35b9a52b0e0d019a5244fbaab699f753b443
treee818c586ecbe1461c16370566656122dd74e4bd9
parent37cddc7d6cf4568a7fb69aeff6f26e4c8a3bc0f7
powerpc/pseries/mobility: retry partition suspend after error

This is a mitigation for the relatively rare occurrence where a
virtual IOA can be in a transient state that prevents the
suspend/migration from succeeding, resulting in an error from
ibm,suspend-me.

If the join/suspend sequence returns an error, it is acceptable to
retry as long as the VASI suspend session state is still
"Suspending" (i.e. the platform is still waiting for the OS to
suspend).

Retry a few times on suspend failure while this condition holds,
progressively increasing the delay between attempts. We don't want to
retry indefinitey because firmware emits an error log event on each
unsuccessful attempt.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201207215200.1785968-15-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/mobility.c