]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitda7cd200f868d866d5b15c2ef5f0f297d4751563
tree048e774eca2e37e27b0c387b86f2edad8ea28f89
parent77dc6e2280835c972a983efe2599d8006551e7ca
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