aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/mp_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm64/arm64/mp_machdep.c')
-rw-r--r--sys/arm64/arm64/mp_machdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index a5afb3f403da..363cb7f6cb81 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#ifdef FDT
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_cpu.h>
#endif
@@ -197,6 +198,10 @@ arm64_cpu_attach(device_t dev)
/* Set the device to start it later */
cpu_list[cpuid] = dev;
+ /* Try to read the numa node of this cpu */
+ OF_getencprop(ofw_bus_get_node(dev), "numa-node-id",
+ &__pcpu[cpuid].pc_domain, sizeof(__pcpu[cpuid].pc_domain));
+
return (0);
}