Fix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in
revision 255744. sys/kern/subr_smp.c: IPI_SUSPEND is only available on amd64 and i386. Protect new uses of this constant with #ifdefs to avoid impacting other platforms. Approved by: re (blanket Xen)
This commit is contained in:
parent
9298484319
commit
255424ddb7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255783
@ -225,6 +225,7 @@ generic_stop_cpus(cpuset_t map, u_int type)
|
||||
CTR2(KTR_SMP, "stop_cpus(%s) with %u type",
|
||||
cpusetobj_strprint(cpusetbuf, &map), type);
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
/*
|
||||
* When suspending, ensure there are are no IPIs in progress.
|
||||
* IPIs that have been issued, but not yet delivered (e.g.
|
||||
@ -234,6 +235,7 @@ generic_stop_cpus(cpuset_t map, u_int type)
|
||||
*/
|
||||
if (type == IPI_SUSPEND)
|
||||
mtx_lock_spin(&smp_ipi_mtx);
|
||||
#endif
|
||||
|
||||
if (stopping_cpu != PCPU_GET(cpuid))
|
||||
while (atomic_cmpset_int(&stopping_cpu, NOCPU,
|
||||
@ -262,8 +264,10 @@ generic_stop_cpus(cpuset_t map, u_int type)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
if (type == IPI_SUSPEND)
|
||||
mtx_unlock_spin(&smp_ipi_mtx);
|
||||
#endif
|
||||
|
||||
stopping_cpu = NOCPU;
|
||||
return (1);
|
||||
|
Loading…
Reference in New Issue
Block a user