[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN RFC PATCH 32/40] xen/x86: make acpi_scan_nodes to be neutral
The code in acpi_scan_nodes can be reused for device tree based NUMA. So we rename acpi_scan_nodes to numa_scan_nodes for a neutral function name. As acpi_numa variable is available in ACPU based NUMA system only, we use CONFIG_ACPI_NUMA to protect it. Signed-off-by: Wei Chen <wei.chen@xxxxxxx> --- xen/arch/x86/srat.c | 4 +++- xen/common/numa.c | 2 +- xen/include/asm-x86/acpi.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c index dcebc7adec..3d4d90a622 100644 --- a/xen/arch/x86/srat.c +++ b/xen/arch/x86/srat.c @@ -362,7 +362,7 @@ void __init srat_parse_regions(u64 addr) } /* Use the information discovered above to actually set up the nodes. */ -int __init acpi_scan_nodes(u64 start, u64 end) +int __init numa_scan_nodes(u64 start, u64 end) { int i; nodemask_t all_nodes_parsed; @@ -371,8 +371,10 @@ int __init acpi_scan_nodes(u64 start, u64 end) for (i = 0; i < MAX_NUMNODES; i++) cutoff_node(i, start, end); +#ifdef CONFIG_ACPI_NUMA if (acpi_numa <= 0) return -1; +#endif if (!nodes_cover_memory()) { bad_srat(); diff --git a/xen/common/numa.c b/xen/common/numa.c index 74960885a6..4152bbe83b 100644 --- a/xen/common/numa.c +++ b/xen/common/numa.c @@ -330,7 +330,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) #endif #ifdef CONFIG_ACPI_NUMA - if ( !numa_off && !acpi_scan_nodes((u64)start_pfn << PAGE_SHIFT, + if ( !numa_off && !numa_scan_nodes((u64)start_pfn << PAGE_SHIFT, (u64)end_pfn << PAGE_SHIFT) ) return; #endif diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h index d347500a3c..33b71dfb3b 100644 --- a/xen/include/asm-x86/acpi.h +++ b/xen/include/asm-x86/acpi.h @@ -102,7 +102,7 @@ extern unsigned long acpi_wakeup_address; #define ARCH_HAS_POWER_INIT 1 extern s8 acpi_numa; -extern int acpi_scan_nodes(u64 start, u64 end); +extern int numa_scan_nodes(u64 start, u64 end); extern struct acpi_sleep_info acpi_sinfo; #define acpi_video_flags bootsym(video_flags) -- 2.25.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |