From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, rkrcmar@redhat.com
Subject: [PATCH kvm-unit-tests 6/6] arm/arm64: gic: apply smp_run
Date: Thu, 25 May 2017 12:28:49 +0200 [thread overview]
Message-ID: <20170525102849.22754-7-drjones@redhat.com> (raw)
In-Reply-To: <20170525102849.22754-1-drjones@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
arm/gic.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arm/gic.c b/arm/gic.c
index 82f663218b0b..629d6b51f68f 100644
--- a/arm/gic.c
+++ b/arm/gic.c
@@ -240,6 +240,14 @@ static void ipi_recv(void)
wfi();
}
+static void ipi_test(void)
+{
+ if (smp_processor_id() == IPI_SENDER)
+ ipi_send();
+ else
+ ipi_recv();
+}
+
static struct gic gicv2 = {
.ipi = {
.send_self = gicv2_ipi_send_self,
@@ -298,7 +306,6 @@ static void run_active_clear_test(void)
int main(int argc, char **argv)
{
char pfx[8];
- int cpu;
if (!gic_init()) {
printf("No supported gic present, skipping tests...\n");
@@ -323,14 +330,7 @@ int main(int argc, char **argv)
if (strcmp(argv[1], "ipi") == 0) {
report_prefix_push(argv[1]);
nr_cpu_check(2);
-
- for_each_present_cpu(cpu) {
- if (cpu == 0)
- continue;
- smp_boot_secondary(cpu,
- cpu == IPI_SENDER ? ipi_send : ipi_recv);
- }
- ipi_recv();
+ smp_run(ipi_test);
} else if (strcmp(argv[1], "active") == 0) {
run_active_clear_test();
} else {
--
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 ` [PATCH kvm-unit-tests 4/6] arm/arm64: selftest: apply smp_run Andrew Jones
2017-05-25 10:28 ` [PATCH kvm-unit-tests 5/6] arm/arm64: spinlock-test: " Andrew Jones
2017-05-25 10:28 ` Andrew Jones [this message]
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-7-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