diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2021-03-15 03:00:45 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-03-23 09:25:12 +1100 |
commit | 274cb1ca2e7ce02cab56f5f4c61a74aeb566f931 (patch) | |
tree | 2d7560711667736ecb0664d10b44be597fdfcece /arch/powerpc/platforms/pseries/lpar.c | |
parent | e834df6cfc71d8e5ce2c27a0184145ea125c3f0f (diff) |
powerpc/pseries/mobility: handle premature return from H_JOIN
The pseries join/suspend sequence in its current form was written with
the assumption that it was the only user of H_PROD and that it needn't
handle spurious successful returns from H_JOIN. That's wrong;
powerpc's paravirt spinlock code uses H_PROD, and CPUs entering
do_join() can be woken prematurely from H_JOIN with a status of
H_SUCCESS as a result. This causes all CPUs to exit the sequence
early, preventing suspend from occurring at all.
Add a 'done' boolean flag to the pseries_suspend_info struct, and have
the waking thread set it before waking the other threads. Threads
which receive H_SUCCESS from H_JOIN retry if the 'done' flag is still
unset.
Fixes: 9327dc0aeef3 ("powerpc/pseries/mobility: use stop_machine for join/suspend")
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210315080045.460331-3-nathanl@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries/lpar.c')
0 files changed, 0 insertions, 0 deletions