Skip to contentSkip to conversation

s390x: smp: make stop stopped cpu look the same as the running case

PATCH Superseded Nico Boehr 2 participants 2 messages Apr 12, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nico Boehr

author
#0 lore raw

PATCH 3/3 s390x: smp: make stop stopped cpu look the same as the running case

Adjust the stop stopped CPU case such that it looks the same as the stop running CPU case: use the nowait variant, handle the error code in the same way and make the report messages look the same.

---
 s390x/smp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
s390x/smp.c +3 -2
index 5257852c35a7..de3aba71c956 100644
@@ -144,8 +144,9 @@ static void test_stop(void)
 	report(smp_cpu_stopped(1), "cpu stopped");
 
 	report_prefix_push("stop stopped CPU");
-	report(!smp_cpu_stop(1), "STOP succeeds");
-	report(smp_cpu_stopped(1), "CPU is stopped");
+	rc = smp_cpu_stop_nowait(1);
+	report(!rc, "return code");
+	report(smp_cpu_stopped(1), "cpu stopped");
 	report_prefix_pop();
 
 	report_prefix_pop();
Signature · 1 line
2.31.1
Reviewed-by on v1 3/3
#1 lore raw
Quoted 7 lines · Nico Boehr

Adjust the stop stopped CPU case such that it looks the same as the stop running
CPU case: use the nowait variant, handle the error code in the same way and make
the report messages look the same.

Quoted 20 lines
---
 s390x/smp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
s390x/smp.c +3 -2
index 5257852c35a7..de3aba71c956 100644
@@ -144,8 +144,9 @@ static void test_stop(void)
 	report(smp_cpu_stopped(1), "cpu stopped");
 
 	report_prefix_push("stop stopped CPU");
-	report(!smp_cpu_stop(1), "STOP succeeds");
-	report(smp_cpu_stopped(1), "CPU is stopped");
+	rc = smp_cpu_stop_nowait(1);
+	report(!rc, "return code");
+	report(smp_cpu_stopped(1), "cpu stopped");
 	report_prefix_pop();
 
 	report_prefix_pop();