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.
         */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to