Page MenuHomeFreeBSD

D48123.id148175.diff
No OneTemporary

D48123.id148175.diff

diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c
--- a/sys/dev/ofw/ofw_cpu.c
+++ b/sys/dev/ofw/ofw_cpu.c
@@ -30,11 +30,13 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/malloc.h>
#include <sys/bus.h>
#include <sys/cpu.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+#include <sys/smp.h>
+
#include <machine/bus.h>
#include <dev/ofw/openfirm.h>
@@ -185,16 +187,25 @@
ofw_cpu_probe(device_t dev)
{
const char *type = ofw_bus_get_type(dev);
+ const char *status = ofw_bus_get_status(dev);
if (type == NULL || strcmp(type, "cpu") != 0)
return (ENXIO);
+ if (status != NULL && strcmp(status, "disabled") == 0)
+ return (ENXIO);
+
device_set_desc(dev, "Open Firmware CPU");
if (!bootverbose && device_get_unit(dev) != 0) {
device_quiet(dev);
device_quiet_children(dev);
}
+ if (device_get_unit(dev) >= mp_ncpus) {
+ device_printf(dev, "WARNING: Discrepancy between "
+ "number of OFW CPUs and logical/booted CPUs");
+ }
+
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 2:26 PM (5 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31037083
Default Alt Text
D48123.id148175.diff (1 KB)

Event Timeline