Message ID | 20220708145424.1848572-9-wei.chen@arm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Device tree based NUMA support for Arm - Part#2 | expand |
On 08.07.2022 16:54, Wei Chen wrote: > 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. Once again I think the rename should happen before the moving to common code. Jan
Hi Jan, > -----Original Message----- > From: Jan Beulich <jbeulich@suse.com> > Sent: 2022年7月12日 22:27 > To: Wei Chen <Wei.Chen@arm.com> > Cc: nd <nd@arm.com>; Andrew Cooper <andrew.cooper3@citrix.com>; Roger Pau > Monné <roger.pau@citrix.com>; Wei Liu <wl@xen.org>; George Dunlap > <george.dunlap@citrix.com>; Julien Grall <julien@xen.org>; Stefano > Stabellini <sstabellini@kernel.org>; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v2 8/9] xen: rename acpi_scan_nodes to numa_scan_nodes > > On 08.07.2022 16:54, Wei Chen wrote: > > 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. > > Once again I think the rename should happen before the moving to > common code. > Ack again. Cheers, Wei Chen > Jan
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
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@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(-)