From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, rkrcmar@redhat.com
Subject: [PATCH kvm-unit-tests 3/3] arm/arm64: rename smp_run to on_cpus
Date: Thu, 1 Jun 2017 15:50:02 +0200 [thread overview]
Message-ID: <20170601135002.26704-4-drjones@redhat.com> (raw)
In-Reply-To: <20170601135002.26704-1-drjones@redhat.com>
Also base on on_cpu_async() to allow it to be called more than once.
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
arm/gic.c | 2 +-
arm/selftest.c | 2 +-
arm/spinlock-test.c | 2 +-
lib/arm/asm/smp.h | 2 +-
lib/arm/smp.c | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arm/gic.c b/arm/gic.c
index 4cdb77b1fdda..2c5832100e0e 100644
--- a/arm/gic.c
+++ b/arm/gic.c
@@ -327,7 +327,7 @@ int main(int argc, char **argv)
if (strcmp(argv[1], "ipi") == 0) {
report_prefix_push(argv[1]);
nr_cpu_check(2);
- smp_run(ipi_test);
+ on_cpus(ipi_test);
} else if (strcmp(argv[1], "active") == 0) {
run_active_clear_test();
} else {
diff --git a/arm/selftest.c b/arm/selftest.c
index dd750c418644..1ad2e7120248 100644
--- a/arm/selftest.c
+++ b/arm/selftest.c
@@ -342,7 +342,7 @@ int main(int argc, char **argv)
} else if (strcmp(argv[1], "smp") == 0) {
report("PSCI version", psci_check());
- smp_run(cpu_report);
+ on_cpus(cpu_report);
} else {
printf("Unknown subtest\n");
diff --git a/arm/spinlock-test.c b/arm/spinlock-test.c
index d1e45d2d9b05..cd03f81c5fae 100644
--- a/arm/spinlock-test.c
+++ b/arm/spinlock-test.c
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
lock_ops.unlock = none_unlock;
}
- smp_run(test_spinlock);
+ on_cpus(test_spinlock);
return report_summary();
}
diff --git a/lib/arm/asm/smp.h b/lib/arm/asm/smp.h
index ca088d654516..4272e0fd9253 100644
--- a/lib/arm/asm/smp.h
+++ b/lib/arm/asm/smp.h
@@ -50,6 +50,6 @@ typedef void (*secondary_entry_fn)(void);
extern void smp_boot_secondary(int cpu, secondary_entry_fn entry);
extern void on_cpu_async(int cpu, void (*func)(void *data), void *data);
extern void on_cpu(int cpu, void (*func)(void *data), void *data);
-extern void smp_run(void (*func)(void));
+extern void on_cpus(void (*func)(void));
#endif /* _ASMARM_SMP_H_ */
diff --git a/lib/arm/smp.c b/lib/arm/smp.c
index f3542b8bad99..7e3c91ce3b48 100644
--- a/lib/arm/smp.c
+++ b/lib/arm/smp.c
@@ -131,14 +131,14 @@ void on_cpu(int cpu, void (*func)(void *data), void *data)
wfe();
}
-void smp_run(void (*func)(void))
+void on_cpus(void (*func)(void))
{
int cpu;
for_each_present_cpu(cpu) {
if (cpu == 0)
continue;
- smp_boot_secondary(cpu, func);
+ on_cpu_async(cpu, (on_cpu_func)func, NULL);
}
func();
--
2.9.4
prev parent reply other threads:[~2017-06-01 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 13:49 [PATCH kvm-unit-tests 0/3] arm/arm64: introduce on_cpu[_async] Andrew Jones
2017-06-01 13:50 ` [PATCH kvm-unit-tests 1/3] arm/arm64: smp: rename secondary_halt to do_idle Andrew Jones
2017-06-01 13:50 ` [PATCH kvm-unit-tests 2/3] arm/arm64: smp: introduce on_cpu and on_cpu_async Andrew Jones
2017-06-01 13:50 ` Andrew Jones [this message]
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=20170601135002.26704-4-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;
as well as URLs for NNTP newsgroup(s).