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

Re: [XEN RFC PATCH 35/40] xen: enable numa_scan_nodes for device tree based NUMA



Hi Wei,

On 11/08/2021 11:24, Wei Chen wrote:
Now, we can use the same function for ACPI and device tree based
NUMA to scan memory nodes.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
  xen/common/numa.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/numa.c b/xen/common/numa.c
index 8ca13e27d1..d15c2fc311 100644
--- a/xen/common/numa.c
+++ b/xen/common/numa.c
@@ -381,7 +381,7 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
          return;
  #endif
-#ifdef CONFIG_ACPI_NUMA
+#if defined(CONFIG_ACPI_NUMA) || defined(CONFIG_DEVICE_TREE_NUMA)

numa.c is only built when CONFIG_NUMA is set. I don't think CONFIG_NUMA will ever set if neither CONFIG_ACPI_NUMA or CONFIG_DEVICE_TREE_NUMA is set. So do we actually need this #ifdef?

      if ( !numa_off && !numa_scan_nodes((u64)start_pfn << PAGE_SHIFT,
           (u64)end_pfn << PAGE_SHIFT) )
          return;


Cheers,

--
Julien Grall



 


Rackspace

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