powerpc/pseries/mobility: extract VASI session polling logic
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 7 Dec 2020 21:51:43 +0000 (15:51 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:40:56 +0000 (21:40 +1100)
commitd9213319b84ee8393475c38361c84151d5c33415
tree048e774eca2e37e27b0c387b86f2edad8ea28f89
parentc3ae9781d5a64093f161e6cc5dfefb0773106ca9
powerpc/pseries/mobility: extract VASI session polling logic

The behavior of rtas_ibm_suspend_me_unsafe() is to return -EAGAIN to
the caller until the specified VASI suspend session state makes the
transition from H_VASI_ENABLED to H_VASI_SUSPENDING. In the interest
of separating concerns to prepare for a new implementation of the
join/suspend sequence, extract VASI session polling logic into a
couple of local functions. Waiting for the session state to reach
H_VASI_SUSPENDING before calling rtas_ibm_suspend_me_unsafe() ensures
that we will never get an EAGAIN result necessitating a retry. No
user-visible change in behavior is intended.

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-12-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/mobility.c