Commit 6f447945 authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini
Browse files

arm/arm64: rename smp_run to on_cpus



Also base on on_cpu_async() to allow it to be called more than once.
Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Message-Id: <20170601135002.26704-4-drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent e713fd55
......@@ -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 {
......
......@@ -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");
......
......@@ -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();
}
......@@ -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_ */
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment