Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 13:56:07 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317191 - head/sys/dev/ofw
Message-ID:  <201704201356.v3KDu7VK017074@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Thu Apr 20 13:56:06 2017
New Revision: 317191
URL: https://svnweb.freebsd.org/changeset/base/317191

Log:
  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.
  
  Reviewed by:	andrew (partially)

Modified:
  head/sys/dev/ofw/ofw_cpu.c

Modified: head/sys/dev/ofw/ofw_cpu.c
==============================================================================
--- head/sys/dev/ofw/ofw_cpu.c	Thu Apr 20 13:46:55 2017	(r317190)
+++ head/sys/dev/ofw/ofw_cpu.c	Thu Apr 20 13:56:06 2017	(r317191)
@@ -320,8 +320,10 @@ ofw_cpu_early_foreach(ofw_cpu_foreach_cb
 		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?201704201356.v3KDu7VK017074>