1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Disable interrupt and preemption for smp_rendezvous() also in the

UP/!SMP case.
The callbacks may be relying on this feature and having 2 different
ways to deal with them is not correct.

Reported by:	rstone
Reviewed by:	jhb
MFC after:	2 weeks
This commit is contained in:
Attilio Rao 2011-11-03 14:36:56 +00:00
parent 0fc9f11d00
commit 2b10b1f872
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227058

View File

@ -415,13 +415,16 @@ smp_rendezvous_cpus(cpuset_t map,
{
int curcpumap, i, ncpus = 0;
/* Look comments in the !SMP case. */
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;
}
@ -666,12 +669,18 @@ smp_rendezvous_cpus(cpuset_t map,
void (*teardown_func)(void *),
void *arg)
{
/*
* In the !SMP case we just need to ensure the same initial conditions
* as the SMP case.
*/
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();
}
void
@ -681,12 +690,15 @@ smp_rendezvous(void (*setup_func)(void *),
void *arg)
{
/* Look comments in the smp_rendezvous_cpus() case. */
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();
}
/*