From f849557c06e55e7ebedc1b5c873fdf5111587918 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 7 Jan 2025 17:58:58 +0000 Subject: [PATCH] x86: Short-circuit ipi_all_but_self() on UP systems Apparently this is required on old intel hw, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275086#c3 PR: 275086 Reviewed by: mav, kib Fixes: 279cd05b7e4d ("Use APIC_IPI_DEST_OTHERS for bitmapped IPIs too.") MFC after: 1 week Diagnosed by: Ben Wilber Differential Revision: https://reviews.freebsd.org/D48361 (cherry picked from commit 254a2b767f9a39f1541e0a07a70bbe269e86ad70) --- sys/x86/x86/mp_x86.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 11b11471d73..c52102e2de1 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1427,6 +1427,9 @@ ipi_all_but_self(u_int ipi) cpuset_t other_cpus; int cpu, c; + if (mp_ncpus == 1) + return; + /* * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit * of help in order to understand what is the source.