From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [PATCH kvm-unit-tests 4/6] arm/arm64: selftest: apply smp_run Date: Thu, 25 May 2017 12:28:47 +0200 Message-ID: <20170525102849.22754-5-drjones@redhat.com> References: <20170525102849.22754-1-drjones@redhat.com> Cc: pbonzini@redhat.com, rkrcmar@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032690AbdEYK3P (ORCPT ); Thu, 25 May 2017 06:29:15 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97D88C027413 for ; Thu, 25 May 2017 10:29:14 +0000 (UTC) In-Reply-To: <20170525102849.22754-1-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Andrew Jones --- arm/selftest.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/arm/selftest.c b/arm/selftest.c index f305f4e3be19..dd750c418644 100644 --- a/arm/selftest.c +++ b/arm/selftest.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static void check_setup(int argc, char **argv) @@ -309,7 +308,6 @@ static bool psci_check(void) return true; } -static cpumask_t smp_reported; static void cpu_report(void) { uint64_t mpidr = get_mpidr(); @@ -317,8 +315,6 @@ static void cpu_report(void) report("CPU(%3d) mpidr=%010" PRIx64, mpidr_to_cpu(mpidr) == cpu, cpu, mpidr); - cpumask_set_cpu(cpu, &smp_reported); - halt(); } int main(int argc, char **argv) @@ -345,22 +341,9 @@ int main(int argc, char **argv) } else if (strcmp(argv[1], "smp") == 0) { - uint64_t mpidr = get_mpidr(); - int cpu; - report("PSCI version", psci_check()); + smp_run(cpu_report); - for_each_present_cpu(cpu) { - if (cpu == 0) - continue; - smp_boot_secondary(cpu, cpu_report); - } - - report("CPU(%3d) mpidr=%010" PRIx64, - mpidr_to_cpu(mpidr) == 0, 0, mpidr); - cpumask_set_cpu(0, &smp_reported); - while (!cpumask_full(&smp_reported)) - cpu_relax(); } else { printf("Unknown subtest\n"); abort(); -- 2.9.4