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)
This commit is contained in:
Olivier Houchard 2017-04-20 13:56:06 +00:00
parent ecb56aaf60
commit 21ce594e7a

View File

@ -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;
}
/*