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

[PATCH v2 8/9] xen: rename acpi_scan_nodes to numa_scan_nodes


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 8 Jul 2022 22:54:23 +0800
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=UQ5GWTIY4MWQGGyhLZ8eQoBIiDbRb+nQhneNRjZRrdA=; b=OMFoz5Tzop2xAvk8ORbRqKpTnwHvZdwrBLkvO2lbAGP7ZfMWoPRxPmjn0/8oPMgyYeNOLMBJfP3C6Bw2QWreuoZj/KZfL2YoBw4fq/qLVi+AuqVlOyN3JwnTP57dpNC1ZSGbnuq/8s2h8pxhEL6TI1KqPhcQcGCC2H5HmnG5L8HK7oTkWjGEP9InwPQc6UIwDImAMhZEeJEWa41m+xGyEv4crfC7QuFAWXmDmzfyQLycdINak+WJhnLD9p/+qiwaVx6okePa4Vpg5POLNKIU/Z6RxVDex4Ii5n9bTnNkfUUFYWzJbdUAVDTt4XlgOrc1f2o2UL8SOrxuNvnBbvIpaA==
  • 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=UQ5GWTIY4MWQGGyhLZ8eQoBIiDbRb+nQhneNRjZRrdA=; b=PEQXCAxziGNx1u6AHJYJ+6hd8k734QBCCKZ4XadKZyVdsjClSHM3ia7GZcxutFlSMzCwhWsPHoHWhhs6cW6xnZTLwSMjuI+YzxhTrGYfZOfUyLLQQmaeJro6rs9czr6MU9yEjM8G2ROa+v0xjgUtWucs4s9iXsluXkaeWfbXKopEbl9lZkaKcPqvR6HaBfZ/zYr5ecPTabVs29gpKaeSaLxPc7NpCeY3UbGVnnbRd5Zn5mTqreQwTn7hTznYKH47nlugKKX2xYGny/7s/4HzyQrQZyLtQRYLLhCoClbgbehyNmc6hHTQKJ4PFmGo0QzXsEydMNejeMssYoOdNHZgxA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=dUcjBxDOp0RiKR9LzrELyrmBSuLHdgOD6F0v3ODTD4xJ5TyiMM4oZDlBX0ksaBpwNzlNvF/9X5+MvrbbGxeWlu6g1wd0KPe7LQ/Q6Zl43tDLOD3L7cxbheRaFfHQfwpVGlMTbOSEHg49lDf1lsaQvErnFcogSKustXDZlBtD1RKeTHjz+ovCfFvTDwWZTPCEh7gn4jnsjVD3c0RiGxXr+olQntZdm1u1MNTCEi/9jhLo7Y5Dpx+6gsOeWxLSmAWbT1FyaU0zik2wA3DTR+KT68Y0pyBWHEO0ckHsje7HurXR0xrQfZmteXtCgtkFyvxGaw3E4WdCSPWE+X3mlM13zw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sk+UwK2Hauzhbnx3shfUGBpacF2Qpvqatnk+geWuGsw0EKKsXwmBKDlceu67ezX4cV/NvzffR8r8TS0Kf+G67m5KYHqELXTr+duV+HpiU8Ud0dN+UzimnRiW51Kw2bwdFVonyhzYW75xX9GwS4INSrx/2MZ5UnyT8Wm3PPGFTMU+vhYuO61WiphtdVI/JyV5kXbk9Oi2EwdL30+Dd0dRlaQIv4IP92a/nGfW1FH0FMx1/qBYFh5loso2tmJP4IcbQEUZYlhBy6FlsRY8CJMpvAj64lIa/utSJ2keyP8d3OR9bY0VzuWo2lpK0HNRgWh6chTK1fkPqUVAx2f8VAD9Jw==
  • Cc: <nd@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 08 Jul 2022 14:55:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

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.chen@xxxxxxx>
---
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




 


Rackspace

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