smp: fix smp_rendezvous_cpus_retry usage before smp starts

Since none of the other CPUs are running there is nobody to clear their
entries and the routine spins indefinitely.
This commit is contained in:
Mateusz Guzik 2020-11-19 04:27:51 +00:00
parent 431fb8abd7
commit c48f897bbe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367829

View File

@ -895,6 +895,21 @@ smp_rendezvous_cpus_retry(cpuset_t map,
{
int cpu;
/*
* Only one CPU to execute on.
*/
if (!smp_started) {
spinlock_enter();
if (setup_func != NULL)
setup_func(arg);
if (action_func != NULL)
action_func(arg);
if (teardown_func != NULL)
teardown_func(arg);
spinlock_exit();
return;
}
/*
* Execute an action on all specified CPUs while retrying until they
* all acknowledge completion.