summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2013-09-22 02:46:13 +0000
committergibbs <gibbs@FreeBSD.org>2013-09-22 02:46:13 +0000
commitf749b57e894fe8edc4ac41bdb13df3198fad2cfb (patch)
treec3c884bae4eaa270db4fcbe1621554e68f4bed29
parentd9f8e5d07be62acd0df762ab276f5a3f50db6b38 (diff)
downloadFreeBSD-src-f749b57e894fe8edc4ac41bdb13df3198fad2cfb.zip
FreeBSD-src-f749b57e894fe8edc4ac41bdb13df3198fad2cfb.tar.gz
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)
-rw-r--r--sys/kern/subr_smp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 86fbebb..f8d95f0 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -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);
OpenPOWER on IntegriCloud