aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorOlivier Houchard <cognet@FreeBSD.org>2017-04-20 13:56:06 +0000
committerOlivier Houchard <cognet@FreeBSD.org>2017-04-20 13:56:06 +0000
commit21ce594e7aa396a9befb6f0a2b25aab263023011 (patch)
treea03e82bc489530d7d9bc5ff16938da2eac1367ec /sys/dev
parentecb56aaf6099f5336b8816cbc1ad21ae55c8a101 (diff)
downloadsrc-21ce594e7aa396a9befb6f0a2b25aab263023011.tar.gz
src-21ce594e7aa396a9befb6f0a2b25aab263023011.zip
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)
Notes
Notes: svn path=/head/; revision=317191
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ofw/ofw_cpu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c
index 4b89b53b9966..a0302e9ff552 100644
--- a/sys/dev/ofw/ofw_cpu.c
+++ b/sys/dev/ofw/ofw_cpu.c
@@ -320,8 +320,10 @@ ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, boolean_t only_runnable)
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;
}
/*