[kvm-unit-tests,PULL,3/9] s390x: Stop the cpu that is executing exit()
diff mbox series

Message ID 20200204071335.18180-4-thuth@redhat.com
State New
Headers show
Series
  • [kvm-unit-tests,PULL,1/9] s390x: smp: Cleanup smp.c
Related show

Commit Message

Thomas Huth Feb. 4, 2020, 7:13 a.m. UTC
From: Janosch Frank <frankja@linux.ibm.com>

CPU 0 is not necessarily the CPU which does the exit if we ran into a
test abort situation. So, let's ask stap() which cpu does the exit and
stop it on exit.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Message-Id: <20200201152851.82867-4-frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/s390x/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/lib/s390x/io.c b/lib/s390x/io.c
index 32f09b5..e091c37 100644
--- a/lib/s390x/io.c
+++ b/lib/s390x/io.c
@@ -46,6 +46,6 @@  void exit(int code)
 	smp_teardown();
 	printf("\nEXIT: STATUS=%d\n", ((code) << 1) | 1);
 	while (1) {
-		sigp(0, SIGP_STOP, 0, NULL);
+		sigp(stap(), SIGP_STOP, 0, NULL);
 	}
 }