Date: Thu, 19 Nov 2020 04:27:52 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367829 - head/sys/kern Message-ID: <202011190427.0AJ4RqTd030476@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Nov 19 04:27:51 2020 New Revision: 367829 URL: https://svnweb.freebsd.org/changeset/base/367829 Log: 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. Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Thu Nov 19 03:59:21 2020 (r367828) +++ head/sys/kern/subr_smp.c Thu Nov 19 04:27:51 2020 (r367829) @@ -896,6 +896,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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011190427.0AJ4RqTd030476>