From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, rkrcmar@redhat.com
Subject: [PATCH kvm-unit-tests 4/6] arm/arm64: selftest: apply smp_run
Date: Thu, 25 May 2017 12:28:47 +0200 [thread overview]
Message-ID: <20170525102849.22754-5-drjones@redhat.com> (raw)
In-Reply-To: <20170525102849.22754-1-drjones@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
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 <asm/thread_info.h>
#include <asm/psci.h>
#include <asm/smp.h>
-#include <asm/cpumask.h>
#include <asm/barrier.h>
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
next prev parent reply other threads:[~2017-05-25 10:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 10:28 [PATCH kvm-unit-tests 0/6] arm/arm64: some cleanups Andrew Jones
2017-05-25 10:28 ` [PATCH kvm-unit-tests 1/6] lib/arm/gic: gic_version cleanup Andrew Jones
2017-05-25 13:53 ` Paolo Bonzini
2017-05-25 14:28 ` Andrew Jones
2017-05-25 10:28 ` [PATCH kvm-unit-tests 2/6] lib/arm/psci: make psci less ugly Andrew Jones
2017-05-25 10:28 ` [PATCH kvm-unit-tests 3/6] lib/arm/smp: introduce smp_run Andrew Jones
2017-05-25 13:56 ` Paolo Bonzini
2017-05-25 14:41 ` Andrew Jones
2017-05-25 15:07 ` Paolo Bonzini
2017-05-26 11:47 ` Andrew Jones
2017-05-26 12:11 ` Paolo Bonzini
2017-05-25 10:28 ` Andrew Jones [this message]
2017-05-25 10:28 ` [PATCH kvm-unit-tests 5/6] arm/arm64: spinlock-test: apply smp_run Andrew Jones
2017-05-25 10:28 ` [PATCH kvm-unit-tests 6/6] arm/arm64: gic: " Andrew Jones
2017-05-25 13:56 ` [PATCH kvm-unit-tests 0/6] arm/arm64: some cleanups Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170525102849.22754-5-drjones@redhat.com \
--to=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox