[PATCH kvm-unit-tests 3/3] arm/arm64: rename smp_run to on_cpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also base on on_cpu_async() to allow it to be called more than once.

Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
 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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux