[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN RFC PATCH 30/40] xen: move NUMA memory and CPU parsed nodemasks to common


  • To: <wei.chen@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>, <jbeulich@xxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Wed, 11 Aug 2021 18:24:13 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kAd68KnXsqd+C2bIAP1n0fHZQ7iABbF7AodWabl+rLs=; b=D3BEQnoT9yVmoXKY7Nou5+sjJzrq7rL9U5CLBk07ebjqRErWVIpdFbmZz3d00fSqxF8TjqnVZbeMtWUDQmkQqJPZFYXTDH3RjFxLFQfRXZgPySVtYF4NwNXVZEsv9Bw72gusvNGWLgxitJBTFePQYCP5pB+V72oyiXMSvZCelYxeYJqpg6Sl1H/YoQy8SrmhxR7XD4rqp8co9w/5xM50uxZdz3pb3TF0N9o4PrQXL7j7/bHpcfBRZlzkojhwbZUVQso/Hm9/PItbb2URW3geQn9okUHiKHLw3P9UgubNlQ7KRUXlv15htp8gk6ud5A9RepXxN0j/gqh+sn4tzK/DUw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kkj1y8eDd3DDs0xSTi4okAKXQyi+0jFKfvIsS/swjVS27HhKUYkQEbQVD+7XWwfbkEH5Q68+dFc3zKI9ouFl+MnFftPrIOa+vqKNUktd4M/SgoFPlsa0IBjSTA/G8SwwkC76SXgftOFl1eTva2kmXYNlEWQqv7tE/5Wbz0V4hWN/OknCSvc8Mm258WCVnSRJQk9CDQk/SJ2Xn8ouubq1qq++owBOTEeRtuOqs6hMLCwtSIiwOGXEklseIZytUk44OdohuX71MRanmhAoyQpbI0SIERDtkWjmbSPjZ94s1tOpvq5kspHGJWqoD0TBIBEwEkEBd0mcvaTKqSwfnJL9TQ==
  • Cc: <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Wed, 11 Aug 2021 10:31:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Both memory_nodes_parsed and processor_nodes_parsed are using
for Arm and x86 to record parded NUMA memory and CPU. So we
move them to common.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
 xen/arch/arm/numa_device_tree.c | 2 --
 xen/arch/x86/srat.c             | 3 ---
 xen/common/numa.c               | 3 +++
 xen/include/xen/nodemask.h      | 2 ++
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/numa_device_tree.c b/xen/arch/arm/numa_device_tree.c
index 27ffb72f7b..f74b7f6427 100644
--- a/xen/arch/arm/numa_device_tree.c
+++ b/xen/arch/arm/numa_device_tree.c
@@ -25,8 +25,6 @@
 #include <asm/setup.h>
 
 s8 device_tree_numa = 0;
-static nodemask_t processor_nodes_parsed __initdata;
-static nodemask_t memory_nodes_parsed __initdata;
 
 static int srat_disabled(void)
 {
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index 2298353846..dd3aa30843 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -24,9 +24,6 @@
 
 static struct acpi_table_slit *__read_mostly acpi_slit;
 
-static nodemask_t memory_nodes_parsed __initdata;
-static nodemask_t processor_nodes_parsed __initdata;
-
 struct pxm2node {
        unsigned pxm;
        nodeid_t node;
diff --git a/xen/common/numa.c b/xen/common/numa.c
index 26c0006d04..79ab250543 100644
--- a/xen/common/numa.c
+++ b/xen/common/numa.c
@@ -35,6 +35,9 @@ int num_node_memblks;
 struct node node_memblk_range[NR_NODE_MEMBLKS];
 nodeid_t memblk_nodeid[NR_NODE_MEMBLKS];
 
+nodemask_t memory_nodes_parsed __initdata;
+nodemask_t processor_nodes_parsed __initdata;
+
 bool numa_off;
 
 /*
diff --git a/xen/include/xen/nodemask.h b/xen/include/xen/nodemask.h
index 1dd6c7458e..29ce5e28e7 100644
--- a/xen/include/xen/nodemask.h
+++ b/xen/include/xen/nodemask.h
@@ -276,6 +276,8 @@ static inline int __cycle_node(int n, const nodemask_t 
*maskp, int nbits)
  */
 
 extern nodemask_t node_online_map;
+extern nodemask_t memory_nodes_parsed;
+extern nodemask_t processor_nodes_parsed;
 
 #if MAX_NUMNODES > 1
 #define num_online_nodes()     nodes_weight(node_online_map)
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.