svn commit: r361901 - head/sys/powerpc/powernv

Justin Hibbits jhibbits at FreeBSD.org
Mon Jun 8 02:28:00 UTC 2020


Author: jhibbits
Date: Mon Jun  8 02:28:00 2020
New Revision: 361901
URL: https://svnweb.freebsd.org/changeset/base/361901

Log:
  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.

Modified:
  head/sys/powerpc/powernv/platform_powernv.c

Modified: head/sys/powerpc/powernv/platform_powernv.c
==============================================================================
--- head/sys/powerpc/powernv/platform_powernv.c	Mon Jun  8 00:46:19 2020	(r361900)
+++ head/sys/powerpc/powernv/platform_powernv.c	Mon Jun  8 02:28:00 2020	(r361901)
@@ -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",


More information about the svn-src-all mailing list