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

[xen staging] xen/arm: use !CONFIG_NUMA to keep fake NUMA API



commit e8f1c8118f7693be20eab2abcb86d16d12729ba0
Author:     Wei Chen <wei.chen@xxxxxxx>
AuthorDate: Fri Jun 10 13:53:13 2022 +0800
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Fri Jun 17 09:36:12 2022 +0100

    xen/arm: use !CONFIG_NUMA to keep fake NUMA API
    
    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>
    Tested-by: Jiamei Xie <jiamei.xie@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 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 */
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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