@@ -164,6 +164,7 @@ static void test_exception_ext_new(void)
.mask = extract_psw_mask(),
.addr = (unsigned long)ecall_setup
};
+ uint16_t cpu1;
report_prefix_push("exception external new");
if (smp_query_num_cpus() < 2) {
@@ -171,14 +172,15 @@ static void test_exception_ext_new(void)
report_prefix_pop();
return;
}
+ cpu1 = smp_cpu_addr_from_idx(1);
- smp_cpu_setup(1, psw);
+ smp_cpu_setup(cpu1, psw);
wait_for_flag();
set_flag(0);
- sigp(1, SIGP_EXTERNAL_CALL, 0, NULL);
+ sigp(cpu1, SIGP_EXTERNAL_CALL, 0, NULL);
wait_for_flag();
- smp_cpu_stop(1);
+ smp_cpu_stop(cpu1);
report_prefix_pop();
}
Use the recently introduced smp_cpu_addr_from_idx to discover the addresses of the CPUs to use in the test, instead of using hardcoded values. This makes the test more portable. Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> --- s390x/skrf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)