All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Chen <wei.chen@arm.com>
To: <xen-devel@lists.xenproject.org>
Cc: <nd@arm.com>, Wei Chen <wei.chen@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Jiamei Xie <jiamei.xie@arm.com>
Subject: [PATCH v4 5/8] xen/arm: use !CONFIG_NUMA to keep fake NUMA API
Date: Mon, 23 May 2022 14:25:22 +0800	[thread overview]
Message-ID: <20220523062525.2504290-6-wei.chen@arm.com> (raw)
In-Reply-To: <20220523062525.2504290-1-wei.chen@arm.com>

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.

Change-Id: I595b4c84f61f0b827ad9dfbeef03aae30f4752f0
Issue-Id: SCM-2240
Signed-off-by: Wei Chen <wei.chen@arm.com>
Tested-by: Jiamei Xie <jiamei.xie@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
v3 -> v4:
no change
v2 -> v3:
Add Tb.
v1 -> v2:
No change.
---
 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 e4c4d89192..268a9db055 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_want_default_dmazone() (false)
 
 #endif /* __ARCH_ARM_NUMA_H */
-- 
2.25.1



  parent reply	other threads:[~2022-05-23  6:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  6:25 [PATCH v4 0/8] Device tree based NUMA support for Arm - Part#1 Wei Chen
2022-05-23  6:25 ` [PATCH v4 1/8] xen: reuse x86 EFI stub functions for Arm Wei Chen
2022-05-23  7:10   ` Jan Beulich
2022-05-23  7:19     ` Wei Chen
2022-05-23  6:25 ` [PATCH v4 2/8] xen/arm: Keep memory nodes in device tree when Xen boots from EFI Wei Chen
2022-05-23  6:25 ` [PATCH v4 3/8] xen: introduce an arch helper for default dma zone status Wei Chen
2022-05-23  6:25 ` [PATCH v4 4/8] xen: decouple NUMA from ACPI in Kconfig Wei Chen
2022-05-23  6:25 ` Wei Chen [this message]
2022-05-23  6:25 ` [PATCH v4 6/8] xen/x86: use paddr_t for addresses in NUMA node structure Wei Chen
2022-05-23  6:25 ` [PATCH v4 7/8] xen/x86: add detection of memory interleaves for different nodes Wei Chen
2022-05-30  1:46   ` Henry Wang
2022-05-31 13:21   ` Jan Beulich
2022-06-01  2:53     ` Wei Chen
2022-06-01  6:32       ` Jan Beulich
2022-06-02  2:20         ` Wei Chen
2022-06-02  4:10     ` Wei Chen
2022-06-02  8:32       ` Jan Beulich
2022-05-23  6:25 ` [PATCH v4 8/8] xen/x86: use INFO level for node's without memory log message Wei Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523062525.2504290-6-wei.chen@arm.com \
    --to=wei.chen@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=jiamei.xie@arm.com \
    --cc=julien@xen.org \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.