We have moved acpi_scan_nodes from x86 to common. Because of
of our previous work, this function no longer has many ACPI
characteristics, except some "SRAT" words in print messages.
So we rename acpi_scan_nodes to a more generic name
numa_scan_nodes, and replace "SRAT" words in print messages.

After doing this, it doesn't make sense to use CONFIG_ACPI_NUMA
to gate numa_scan_nodes in numa_initmem_init. As CONFIG_ACPI_NUMA
will be selected by CONFIG_NUMA for x86. So, we replace
CONFIG_ACPI_NUMA by CONFIG_NUMA.

We take this opportunity to make this function static, since
it currently has no external callers.

Signed-off-by: Wei Chen <wei.c...@arm.com>
---
v1 -> v2:
1. Merge two patches into this patch:
   1. replace CONFIG_ACPI_NUMA by CONFIG_NUMA.
   2. replace "SRAT" texts.
2. Turn numa_scan_nodes to static.
---
 xen/arch/x86/include/asm/acpi.h |  1 -
 xen/common/numa.c               | 10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acpi.h
index ab0d56dd70..f6ea3f1a9a 100644
--- a/xen/arch/x86/include/asm/acpi.h
+++ b/xen/arch/x86/include/asm/acpi.h
@@ -101,7 +101,6 @@ extern unsigned long acpi_wakeup_address;
 
 #define ARCH_HAS_POWER_INIT    1
 
-extern int acpi_scan_nodes(u64 start, u64 end);
 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
 
 extern struct acpi_sleep_info acpi_sinfo;
diff --git a/xen/common/numa.c b/xen/common/numa.c
index 5ab061e991..0f62638e4c 100644
--- a/xen/common/numa.c
+++ b/xen/common/numa.c
@@ -285,7 +285,7 @@ static int __init nodes_cover_memory(void)
 }
 
 /* Use the information discovered above to actually set up the nodes. */
-int __init acpi_scan_nodes(paddr_t start, paddr_t end)
+static int __init numa_scan_nodes(paddr_t start, paddr_t end)
 {
     int i;
     nodemask_t all_nodes_parsed;
@@ -310,7 +310,7 @@ int __init acpi_scan_nodes(paddr_t start, paddr_t end)
     if ( memnode_shift < 0 )
     {
         printk(KERN_ERR
-               "SRAT: No NUMA node hash function found. Contact maintainer\n");
+               "NUMA: No NUMA node hash function found. Contact maintainer\n");
         numa_bad();
         return -1;
     }
@@ -323,7 +323,7 @@ int __init acpi_scan_nodes(paddr_t start, paddr_t end)
         paddr_t size = nodes[i].end - nodes[i].start;
 
         if ( size == 0 )
-            printk(KERN_INFO "SRAT: node %u has no memory\n", i);
+            printk(KERN_INFO "NUMA: node %u has no memory\n", i);
 
         setup_node_bootmem(i, nodes[i].start, nodes[i].end);
     }
@@ -540,8 +540,8 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
         return;
 #endif
 
-#ifdef CONFIG_ACPI_NUMA
-    if ( numa_status != numa_off && !acpi_scan_nodes(start, end) )
+#ifdef CONFIG_NUMA
+    if ( numa_status != numa_off && !numa_scan_nodes(start, end) )
         return;
 #endif
 
-- 
2.25.1


Reply via email to