Author: kevans
Date: Wed Mar 14 03:36:27 2018
New Revision: 330899
URL: https://svnweb.freebsd.org/changeset/base/330899

Log:
  MFC r317191, r317195: Don't ignore "disabled" CPUs
  
  r317191 (cognet):
  ePAPR states that any non-boot CPU will come in "disabled" state. So we
  should not consider a "disabled" cpu as a CPU we have to ignore, and we
  should use them if they provide a "enable-method".
  While I'm there, support "ok" as well as "okay", while ePAPR only accepts
  "okay", linux accepts "ok" too so we can expect it to be used.
  
  r317195 (cognet):
  Update comment ot reflect realilty, we know also take care of CPUs that
  provide a enable-method.

Modified:
  stable/11/sys/dev/ofw/ofw_cpu.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ofw/ofw_cpu.c
==============================================================================
--- stable/11/sys/dev/ofw/ofw_cpu.c     Wed Mar 14 03:30:34 2018        
(r330898)
+++ stable/11/sys/dev/ofw/ofw_cpu.c     Wed Mar 14 03:36:27 2018        
(r330899)
@@ -315,13 +315,16 @@ ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, boo
 
                /*
                 * If we are filtering by runnable then limit to only
-                * those that have been enabled.
+                * those that have been enabled, or do provide a method
+                * to enable them.
                 */
                if (only_runnable) {
                        status[0] = '\0';
                        OF_getprop(child, "status", status, sizeof(status));
-                       if (status[0] != '\0' && strcmp(status, "okay") != 0)
-                               continue;
+                       if (status[0] != '\0' && strcmp(status, "okay") != 0 &&
+                               strcmp(status, "ok") != 0 &&
+                               !OF_hasprop(child, "enable-method"))
+                                       continue;
                }
 
                /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to