Skip to contentSkip to conversation

Misc maintenance fixes 2022-04

PATCH In review Nico Boehr 2 participants 5 messages Apr 21, 2022

Subsystems (2)
lore
Share & tools
lore

Nico Boehr

author
#0 lore raw

v2 cover Misc maintenance fixes 2022-04

Changelog from v1:
----
* tprot: Change system include to lib include in commit message

Misc small fixes, which I previously sent as:
- [kvm-unit-tests PATCH v1 1/3] s390x: epsw: fix report_pop_prefix() when running under non-QEMU
- [kvm-unit-tests PATCH v1 2/3] s390x: tprot: use system include for mmu.h
- [kvm-unit-tests PATCH v1 3/3] s390x: smp: make stop stopped cpu look the same as the running case

I broke the threading when I sent the patches, so Janosch asked me to resend this as a new series.

Nico Boehr (3):
s390x: epsw: fix report_pop_prefix() when running under non-QEMU
s390x: tprot: use lib include for mmu.h
s390x: smp: make stop stopped cpu look the same as the running case

 s390x/epsw.c  | 4 ++--
 s390x/smp.c   | 5 +++--
 s390x/tprot.c | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH v2 1/3 s390x: epsw: fix report_pop_prefix() when running under non-QEMU

When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check.

---
 s390x/epsw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
s390x/epsw.c +2 -2
index 5b73f4b3db6c..d8090d95a486 100644
@@ -97,13 +97,13 @@ static void test_epsw(void)
 
 int main(int argc, char **argv)
 {
+	report_prefix_push("epsw");
+
 	if (!host_is_kvm() && !host_is_tcg()) {
 		report_skip("Not running under QEMU");
 		goto done;
 	}
 
-	report_prefix_push("epsw");
-
 	test_epsw();
 
 done:
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH v2 2/3 s390x: tprot: use lib include for mmu.h

In reply to Nico Boehr

mmu.h should come from the library includes

---
 s390x/tprot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/tprot.c +1 -1
index 460a0db7ffcf..760e7ecdf914 100644
@@ -12,7 +12,7 @@
 #include <bitops.h>
 #include <asm/pgtable.h>
 #include <asm/interrupt.h>
-#include "mmu.h"
+#include <mmu.h>
 #include <vmalloc.h>
 #include <sclp.h>
 
Signature · 1 line
2.31.1
author
#3 lore raw

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

In reply to 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.

---
 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
#4 lore raw
In reply to Nico Boehr
Quoted 11 lines · On Thu, 21 Apr 2022 10:50:18 +0200 Nico Boehr <[email protected]> wrote:

Changelog from v1:
----
* tprot: Change system include to lib include in commit message

Misc small fixes, which I previously sent as:
- [kvm-unit-tests PATCH v1 1/3] s390x: epsw: fix report_pop_prefix() when running under non-QEMU
- [kvm-unit-tests PATCH v1 2/3] s390x: tprot: use system include for mmu.h
- [kvm-unit-tests PATCH v1 3/3] s390x: smp: make stop stopped cpu look the same as the running case

Quoted 2 lines

I broke the threading when I sent the patches, so Janosch asked me to resend this as a new series.

thanks, queued

Quoted 11 lines

Nico Boehr (3):
s390x: epsw: fix report_pop_prefix() when running under non-QEMU
s390x: tprot: use lib include for mmu.h
s390x: smp: make stop stopped cpu look the same as the running case

 s390x/epsw.c  | 4 ++--
 s390x/smp.c   | 5 +++--
 s390x/tprot.c | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)