Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2018 03:36:27 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330899 - stable/11/sys/dev/ofw
Message-ID:  <201803140336.w2E3aRBU046133@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}
 
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803140336.w2E3aRBU046133>