diff mbox series

[kvm-unit-tests,v2,6/6] s390x: uv-host: use CPU indexes instead of addresses

Message ID 20220204130855.39520-7-imbrenda@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: smp: use CPU indexes instead of addresses | expand

Commit Message

Claudio Imbrenda Feb. 4, 2022, 1:08 p.m. UTC
Adapt the test to the new semantics of the smp_* functions, and use CPU
indexes instead of addresses.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 s390x/uv-host.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nico Boehr Feb. 14, 2022, 4:11 p.m. UTC | #1
On Fri, 2022-02-04 at 14:08 +0100, Claudio Imbrenda wrote:
> Adapt the test to the new semantics of the smp_* functions, and use
> CPU
> indexes instead of addresses.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>  s390x/uv-host.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/s390x/uv-host.c b/s390x/uv-host.c
> index 92a41069..a3d45d63 100644
> --- a/s390x/uv-host.c
> +++ b/s390x/uv-host.c
> @@ -267,12 +267,12 @@ static void test_config_create(void)
>         uvcb_cgc.conf_base_stor_origin = tmp;
>  
>         if (smp_query_num_cpus() == 1) {
> -               sigp_retry(1, SIGP_SET_PREFIX,
> +               smp_sigp_retry(1, SIGP_SET_PREFIX,

As smp_query_num_cpus() == 1, smp_sigp* will always run into an
assert() here.
Steffen Eiden Feb. 15, 2022, 11:31 a.m. UTC | #2
On 2/4/22 14:08, Claudio Imbrenda wrote:
> Adapt the test to the new semantics of the smp_* functions, and use CPU
> indexes instead of addresses.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
diff mbox series

Patch

diff --git a/s390x/uv-host.c b/s390x/uv-host.c
index 92a41069..a3d45d63 100644
--- a/s390x/uv-host.c
+++ b/s390x/uv-host.c
@@ -267,12 +267,12 @@  static void test_config_create(void)
 	uvcb_cgc.conf_base_stor_origin = tmp;
 
 	if (smp_query_num_cpus() == 1) {
-		sigp_retry(1, SIGP_SET_PREFIX,
+		smp_sigp_retry(1, SIGP_SET_PREFIX,
 			   uvcb_cgc.conf_var_stor_origin + PAGE_SIZE, NULL);
 		rc = uv_call(0, (uint64_t)&uvcb_cgc);
 		report(uvcb_cgc.header.rc == 0x10e && rc == 1 &&
 		       !uvcb_cgc.guest_handle, "variable storage area contains lowcore");
-		sigp_retry(1, SIGP_SET_PREFIX, 0x0, NULL);
+		smp_sigp_retry(1, SIGP_SET_PREFIX, 0x0, NULL);
 	}
 
 	tmp = uvcb_cgc.guest_sca;