[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/37] xen/arm: use NR_MEM_BANKS to override default NR_NODE_MEMBLKS
- To: <wei.chen@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
- From: Wei Chen <wei.chen@xxxxxxx>
- Date: Thu, 23 Sep 2021 20:02:21 +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; bh=6dEtUaYVX87QwORy8SpB1QfVQ6OMtEh5+JCNvdfCby4=; b=Sk9rN/s5Ms3xycath6IGwhSNy0e3i2rjAi8eNKihEqAZuRR1g0RPRAEy8gRbGLOuIfZhIt28x4s+OwksNvqR7DG02/DHl0d6CjrjsBFk/19nED3EH23VGnmhy08x4Rngl5kU8IvGsnYa4oJXOirS59xiHQf+fL+NujDNHOI0St8CyE/M5OcZMYH17ZMq2MhROjzLcdkuDfGa7/dpECGLrGUI8bijbHDP6hEWVDkNsdDFi01THY3CMc/Epdv4MVkzicfaBvH8pe9nhhxGY+2bgi8VLIfA8wsH814aGao92HQQp8ALnwD0FhoHQIad73wKBeeAByzcWloiaDdzt7cx6g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOegBsqLDJqcFf/9zDozwwhanjaRYg/F3zPM7mf8OYU/DByb/EcCK49aY2hbuVPh8UsGTDwf0PzYqrBVcnZFtajfJSiwV43JMQe48mxgS7MxGJ9lDMxonf9pP4hls5MR86kFen7/f6GqruOdO61CbnK8bPE7TD9bAKghh30edEcYJN/beeNHeWC9WF3an3o/2GdWVJPyQ6uvSRffyfavz8EnvitWbN6N0UfIMHDkj78Epxqc9WOw6KxND4Ghp9Ix9hezMqzWc9B3697dGCUOqKlTZP+RUQBfCN9Xnm+phJ3EZ8g67cmrNAT+3wseebXcCUMbmeR9hj1YMUq72vjwGw==
- Cc: <Bertrand.Marquis@xxxxxxx>
- Delivery-date: Thu, 23 Sep 2021 12:17:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
As a memory range described in device tree cannot be split across
multiple nodes. So we define NR_NODE_MEMBLKS as NR_MEM_BANKS in
arch header. And keep default NR_NODE_MEMBLKS in common header
for those architectures NUMA is disabled.
Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
xen/include/asm-arm/numa.h | 8 +++++++-
xen/include/xen/numa.h | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/xen/include/asm-arm/numa.h b/xen/include/asm-arm/numa.h
index 8f1c67e3eb..21569e634b 100644
--- a/xen/include/asm-arm/numa.h
+++ b/xen/include/asm-arm/numa.h
@@ -3,9 +3,15 @@
#include <xen/mm.h>
+#include <asm/setup.h>
+
typedef u8 nodeid_t;
-#ifndef CONFIG_NUMA
+#ifdef CONFIG_NUMA
+
+#define NR_NODE_MEMBLKS NR_MEM_BANKS
+
+#else
/* Fake one node for now. See also node_online_map. */
#define cpu_to_node(cpu) 0
diff --git a/xen/include/xen/numa.h b/xen/include/xen/numa.h
index 1978e2be1b..1731e1cc6b 100644
--- a/xen/include/xen/numa.h
+++ b/xen/include/xen/numa.h
@@ -12,7 +12,9 @@
#define MAX_NUMNODES 1
#endif
+#ifndef NR_NODE_MEMBLKS
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
+#endif
#define vcpu_to_node(v) (cpu_to_node((v)->processor))
--
2.25.1
|