powerpc/powernv: Don't configure disabled CPUs

If the POWER firmware detects a bad CPU core, it will "GUARD" it out,
marking it disabled.  Any attempt to spin up a bad CPU will trigger a panic
later on when waiting for threads on said core to wake up.  Support limping
along on fewer cores instead.
This commit is contained in:
Justin Hibbits 2020-06-08 02:28:00 +00:00
parent b68e92ff60
commit e48f804f8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361901

View File

@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$");
#include <machine/trap.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <machine/ofw_machdep.h>
#include <powerpc/aim/mmu_oea64.h>
@ -332,6 +334,8 @@ powernv_cpuref_init(void)
for (cpu = OF_child(dev); cpu != 0; cpu = OF_peer(cpu)) {
res = OF_getprop(cpu, "device_type", buf, sizeof(buf));
if (res > 0 && strcmp(buf, "cpu") == 0) {
if (!ofw_bus_node_status_okay(cpu))
continue;
res = OF_getproplen(cpu, "ibm,ppc-interrupt-server#s");
if (res > 0) {
OF_getencprop(cpu, "ibm,ppc-interrupt-server#s",