Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2017 10:33:22 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322051 - head/sys/arm64/arm64
Message-ID:  <201708041033.v74AXMQf073120@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Fri Aug  4 10:33:22 2017
New Revision: 322051
URL: https://svnweb.freebsd.org/changeset/base/322051

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

Modified:
  head/sys/arm64/arm64/mp_machdep.c

Modified: head/sys/arm64/arm64/mp_machdep.c
==============================================================================
--- head/sys/arm64/arm64/mp_machdep.c	Fri Aug  4 09:45:40 2017	(r322050)
+++ head/sys/arm64/arm64/mp_machdep.c	Fri Aug  4 10:33:22 2017	(r322051)
@@ -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
 
@@ -196,6 +197,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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708041033.v74AXMQf073120>