From: Christian Borntraeger <borntraeger@xxxxxxxxxx> On s390x hosts with a single CPU, the smp test case hangs (loops). The check if our restart has finished is wrong. Sigp sense running status checks if the CPU is currently backed by a real CPU. This means that on single CPU hosts a sigp sense running will never claim that a target is running. We need to check for not being stopped instead. Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx> Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> Message-Id: <20200330084911.34248-2-borntraeger@xxxxxxxxxx> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> --- lib/s390x/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c index 3f86243..203792a 100644 --- a/lib/s390x/smp.c +++ b/lib/s390x/smp.c @@ -128,7 +128,7 @@ static int smp_cpu_restart_nolock(uint16_t addr, struct psw *psw) * The order has been accepted, but the actual restart may not * have been performed yet, so wait until the cpu is running. */ - while (!smp_cpu_running(addr)) + while (smp_cpu_stopped(addr)) mb(); cpu->active = true; return 0; -- 2.25.3