[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/10] xen/arm: use !CONFIG_NUMA to keep fake NUMA API
- To: <--to=xen-devel@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Wei Chen <wei.chen@xxxxxxx>
- Date: Mon, 18 Apr 2022 17:07:33 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ryDzFvecatRrku+p3Uf242SapmXbat71UQcLw2AlN5k=; b=h85gJgsW7lC3C9jfpluPe8RVDCVyZnAfnyMH0xqnV9qfRRsqL28ymsSPsenYXwScE0BQsQS2kK/Z1p3yXqcNQCD7iyrDqh9NiG1HeZXJBMxv7D0IZHxR9oVnsC0VonNX5Ps9nF6vjZFNP34IeNZDBXKJ0TacoejsBdjZrK5HbDfu7KwQTpiRsrYeRXolHl4ayqFAWvkg42rywDoPQqUr0vR58YNsS+RM3k/KgMkQ9I+YDM1/NRT7wBUgQcljTf65XZ62QOiiYbcaT4K+eBHlTioOswT7zf82YlZYLrLj8HGyibsgLeU+EPUUyaYjNDhMrvZcp2E/8YiYdoBtALKGIg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvbN3UGXKosLyTwzRN1T4ZaXMq65MMCC2iQhb8bXVEC3wO+tLkFLtfhHTQcaOqaerAU2lSoPFOVixllZ60q7MqHUIKlx9w2+CfbrUcMKFZ0u+yRWTvjdiHRV/r9HlUnUhQ2gbW1qgDfamW4bGnUmNsIIC83nLU/TRfvOTd0hDRqUKHZK31H8LeZRMVg6clokV0GnSNzA2EhtezM3zZ8KJOCMylbL/Kv1Dn5djTTuzvYIE3HkvxJgvOf1DRj9+XiE9BrfZdPiDjwP8iQzTFK+GMoM/OPll9+iaF/ri/ti/R4Nn36is5tM9Yximlh9IjVNPTAbqT42FfMVvHlc6/5UvQ==
- Cc: <nd@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 18 Apr 2022 09:11:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
We have introduced CONFIG_NUMA in a previous patch. And this
option is enabled only on x86 at the current stage. In a follow
up patch, we will enable this option for Arm. But we still
want users to be able to disable the CONFIG_NUMA via Kconfig. In
this case, keep the fake NUMA API, will make Arm code still
able to work with NUMA aware memory allocation and scheduler.
Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
xen/arch/arm/include/asm/numa.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/arm/include/asm/numa.h b/xen/arch/arm/include/asm/numa.h
index 268ba93a92..59cdf8e39e 100644
--- a/xen/arch/arm/include/asm/numa.h
+++ b/xen/arch/arm/include/asm/numa.h
@@ -5,6 +5,8 @@
typedef u8 nodeid_t;
+#ifndef CONFIG_NUMA
+
/* Fake one node for now. See also node_online_map. */
#define cpu_to_node(cpu) 0
#define node_to_cpumask(node) (cpu_online_map)
@@ -24,6 +26,9 @@ extern mfn_t first_valid_mfn;
#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn))
#define node_start_pfn(nid) (mfn_x(first_valid_mfn))
#define __node_distance(a, b) (20)
+
+#endif
+
#define arch_have_default_dmazone() (false)
#endif /* __ARCH_ARM_NUMA_H */
--
2.25.1
|