aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2017-08-04 10:33:22 +0000
committerAndrew Turner <andrew@FreeBSD.org>2017-08-04 10:33:22 +0000
commitdbba8930ce0a6febdf3c32a5ab900938145e965c (patch)
tree835db2d0780cd89a1c19f2a15156cd962036f968 /sys/arm64
parent4e93dbdf47513c4b529252e066679cf95e10de4a (diff)
downloadsrc-dbba8930ce0a6febdf3c32a5ab900938145e965c.tar.gz
src-dbba8930ce0a6febdf3c32a5ab900938145e965c.zip
Read the numa-node-id property from each CPU node. This will initially be
used to support the dual package ThunderX where we need to send MSI/MSI-X interrupts to the same package as the device the interrupt came from. Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=322051
Diffstat (limited to 'sys/arm64')
-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);
}