forked from mirrors/linux
		
	mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA
After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA configuration options are equivalent. Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. Done with $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ $(git grep -wl NEED_MULTIPLE_NODES) with manual tweaks afterwards. [rppt@linux.ibm.com: fix arm boot crash] Link: https://lkml.kernel.org/r/YMj9vHhHOiCVN4BF@linux.ibm.com Link: https://lkml.kernel.org/r/20210608091316.3622-9-rppt@kernel.org Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: David Hildenbrand <david@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Matt Turner <mattst88@gmail.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									48d9f3355a
								
							
						
					
					
						commit
						a9ee6cf5c6
					
				
					 36 changed files with 59 additions and 69 deletions
				
			
		|  | @ -1035,7 +1035,7 @@ config NODES_SHIFT | ||||||
| 	int "Maximum NUMA Nodes (as a power of 2)" | 	int "Maximum NUMA Nodes (as a power of 2)" | ||||||
| 	range 1 10 | 	range 1 10 | ||||||
| 	default "4" | 	default "4" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	help | 	help | ||||||
| 	  Specify the maximum number of NUMA Nodes available on the target | 	  Specify the maximum number of NUMA Nodes available on the target | ||||||
| 	  system.  Increases memory reserved to accommodate various tables. | 	  system.  Increases memory reserved to accommodate various tables. | ||||||
|  |  | ||||||
|  | @ -302,7 +302,7 @@ config NODES_SHIFT | ||||||
| 	int "Max num nodes shift(3-10)" | 	int "Max num nodes shift(3-10)" | ||||||
| 	range 3 10 | 	range 3 10 | ||||||
| 	default "10" | 	default "10" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	help | 	help | ||||||
| 	  This option specifies the maximum number of nodes in your SSI system. | 	  This option specifies the maximum number of nodes in your SSI system. | ||||||
| 	  MAX_NUMNODES will be 2^(This value). | 	  MAX_NUMNODES will be 2^(This value). | ||||||
|  |  | ||||||
|  | @ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET | ||||||
| config NODES_SHIFT | config NODES_SHIFT | ||||||
| 	int | 	int | ||||||
| 	default "6" | 	default "6" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 
 | 
 | ||||||
| config HW_PERF_EVENTS | config HW_PERF_EVENTS | ||||||
| 	bool "Enable hardware performance counter support for perf events" | 	bool "Enable hardware performance counter support for perf events" | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <asm/page.h> | #include <asm/page.h> | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| # include <mmzone.h> | # include <mmzone.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) | ||||||
| 
 | 
 | ||||||
| /* pfn_valid is defined in linux/mmzone.h */ | /* pfn_valid is defined in linux/mmzone.h */ | ||||||
| 
 | 
 | ||||||
| #elif defined(CONFIG_NEED_MULTIPLE_NODES) | #elif defined(CONFIG_NUMA) | ||||||
| 
 | 
 | ||||||
| #define pfn_valid(pfn)							\ | #define pfn_valid(pfn)							\ | ||||||
| ({									\ | ({									\ | ||||||
|  |  | ||||||
|  | @ -394,7 +394,7 @@ void maar_init(void) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| void __init paging_init(void) | void __init paging_init(void) | ||||||
| { | { | ||||||
| 	unsigned long max_zone_pfns[MAX_NR_ZONES]; | 	unsigned long max_zone_pfns[MAX_NR_ZONES]; | ||||||
|  | @ -473,7 +473,7 @@ void __init mem_init(void) | ||||||
| 				0x80000000 - 4, KCORE_TEXT); | 				0x80000000 - 4, KCORE_TEXT); | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | #endif /* !CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| void free_init_pages(const char *what, unsigned long begin, unsigned long end) | void free_init_pages(const char *what, unsigned long begin, unsigned long end) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -671,7 +671,7 @@ config NODES_SHIFT | ||||||
| 	int | 	int | ||||||
| 	default "8" if PPC64 | 	default "8" if PPC64 | ||||||
| 	default "4" | 	default "4" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 
 | 
 | ||||||
| config USE_PERCPU_NUMA_NODE_ID | config USE_PERCPU_NUMA_NODE_ID | ||||||
| 	def_bool y | 	def_bool y | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ | ||||||
|  *    flags field of the struct page |  *    flags field of the struct page | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| extern struct pglist_data *node_data[]; | extern struct pglist_data *node_data[]; | ||||||
| /*
 | /*
 | ||||||
|  | @ -41,7 +41,7 @@ u64 memory_hotplug_max(void); | ||||||
| 
 | 
 | ||||||
| #else | #else | ||||||
| #define memory_hotplug_max() memblock_end_of_DRAM() | #define memory_hotplug_max() memblock_end_of_DRAM() | ||||||
| #endif /* CONFIG_NEED_MULTIPLE_NODES */ | #endif /* CONFIG_NUMA */ | ||||||
| #ifdef CONFIG_FA_DUMP | #ifdef CONFIG_FA_DUMP | ||||||
| #define __HAVE_ARCH_RESERVED_KERNEL_PAGES | #define __HAVE_ARCH_RESERVED_KERNEL_PAGES | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, | ||||||
| 					size_t align) | 					size_t align) | ||||||
| { | { | ||||||
| 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int node = early_cpu_to_node(cpu); | 	int node = early_cpu_to_node(cpu); | ||||||
| 	void *ptr; | 	void *ptr; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | ||||||
| 			zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), | 			zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), | ||||||
| 						GFP_KERNEL, cpu_to_node(cpu)); | 						GFP_KERNEL, cpu_to_node(cpu)); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 		/*
 | 		/*
 | ||||||
| 		 * numa_node_id() works after this. | 		 * numa_node_id() works after this. | ||||||
| 		 */ | 		 */ | ||||||
|  |  | ||||||
|  | @ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) | ||||||
| void arch_crash_save_vmcoreinfo(void) | void arch_crash_save_vmcoreinfo(void) | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	VMCOREINFO_SYMBOL(node_data); | 	VMCOREINFO_SYMBOL(node_data); | ||||||
| 	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); | 	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); | ||||||
| #endif | #endif | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| 	VMCOREINFO_SYMBOL(contig_page_data); | 	VMCOREINFO_SYMBOL(contig_page_data); | ||||||
| #endif | #endif | ||||||
| #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) | #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ obj-y				:= fault.o mem.o pgtable.o mmap.o maccess.o \ | ||||||
| obj-$(CONFIG_PPC_MMU_NOHASH)	+= nohash/ | obj-$(CONFIG_PPC_MMU_NOHASH)	+= nohash/ | ||||||
| obj-$(CONFIG_PPC_BOOK3S_32)	+= book3s32/ | obj-$(CONFIG_PPC_BOOK3S_32)	+= book3s32/ | ||||||
| obj-$(CONFIG_PPC_BOOK3S_64)	+= book3s64/ | obj-$(CONFIG_PPC_BOOK3S_64)	+= book3s64/ | ||||||
| obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o | obj-$(CONFIG_NUMA) += numa.o | ||||||
| obj-$(CONFIG_PPC_MM_SLICES)	+= slice.o | obj-$(CONFIG_PPC_MM_SLICES)	+= slice.o | ||||||
| obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o | obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o | ||||||
| obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o | obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o | ||||||
|  |  | ||||||
|  | @ -127,7 +127,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| void __init mem_topology_setup(void) | void __init mem_topology_setup(void) | ||||||
| { | { | ||||||
| 	max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; | 	max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; | ||||||
|  | @ -162,7 +162,7 @@ static int __init mark_nonram_nosave(void) | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| #else /* CONFIG_NEED_MULTIPLE_NODES */ | #else /* CONFIG_NUMA */ | ||||||
| static int __init mark_nonram_nosave(void) | static int __init mark_nonram_nosave(void) | ||||||
| { | { | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
|  | @ -332,7 +332,7 @@ config NODES_SHIFT | ||||||
| 	int "Maximum NUMA Nodes (as a power of 2)" | 	int "Maximum NUMA Nodes (as a power of 2)" | ||||||
| 	range 1 10 | 	range 1 10 | ||||||
| 	default "2" | 	default "2" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	help | 	help | ||||||
| 	  Specify the maximum number of NUMA Nodes available on the target | 	  Specify the maximum number of NUMA Nodes available on the target | ||||||
| 	  system.  Increases memory reserved to accommodate various tables. | 	  system.  Increases memory reserved to accommodate various tables. | ||||||
|  |  | ||||||
|  | @ -475,7 +475,7 @@ config NUMA | ||||||
| 
 | 
 | ||||||
| config NODES_SHIFT | config NODES_SHIFT | ||||||
| 	int | 	int | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	default "1" | 	default "1" | ||||||
| 
 | 
 | ||||||
| config SCHED_SMT | config SCHED_SMT | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| #ifndef __ASM_SH_MMZONE_H | #ifndef __ASM_SH_MMZONE_H | ||||||
| #define __ASM_SH_MMZONE_H | #define __ASM_SH_MMZONE_H | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| #include <linux/numa.h> | #include <linux/numa.h> | ||||||
| 
 | 
 | ||||||
| extern struct pglist_data *node_data[]; | extern struct pglist_data *node_data[]; | ||||||
|  | @ -31,7 +31,7 @@ static inline void | ||||||
| setup_bootmem_node(int nid, unsigned long start, unsigned long end) | setup_bootmem_node(int nid, unsigned long start, unsigned long end) | ||||||
| { | { | ||||||
| } | } | ||||||
| #endif /* CONFIG_NEED_MULTIPLE_NODES */ | #endif /* CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| /* Platform specific mem init */ | /* Platform specific mem init */ | ||||||
| void __init plat_mem_setup(void); | void __init plat_mem_setup(void); | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ static int __init topology_init(void) | ||||||
| { | { | ||||||
| 	int i, ret; | 	int i, ret; | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	for_each_online_node(i) | 	for_each_online_node(i) | ||||||
| 		register_one_node(i); | 		register_one_node(i); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -120,7 +120,7 @@ config NODES_SHIFT | ||||||
| 	int | 	int | ||||||
| 	default "3" if CPU_SUBTYPE_SHX3 | 	default "3" if CPU_SUBTYPE_SHX3 | ||||||
| 	default "1" | 	default "1" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 
 | 
 | ||||||
| config ARCH_FLATMEM_ENABLE | config ARCH_FLATMEM_ENABLE | ||||||
| 	def_bool y | 	def_bool y | ||||||
|  |  | ||||||
|  | @ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) | ||||||
| 
 | 
 | ||||||
| 	get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); | 	get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	NODE_DATA(nid) = memblock_alloc_try_nid( | 	NODE_DATA(nid) = memblock_alloc_try_nid( | ||||||
| 				sizeof(struct pglist_data), | 				sizeof(struct pglist_data), | ||||||
| 				SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, | 				SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, | ||||||
|  |  | ||||||
|  | @ -265,7 +265,7 @@ config NODES_SHIFT | ||||||
| 	int "Maximum NUMA Nodes (as a power of 2)" | 	int "Maximum NUMA Nodes (as a power of 2)" | ||||||
| 	range 4 5 if SPARC64 | 	range 4 5 if SPARC64 | ||||||
| 	default "5" | 	default "5" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	help | 	help | ||||||
| 	  Specify the maximum number of NUMA Nodes available on the target | 	  Specify the maximum number of NUMA Nodes available on the target | ||||||
| 	  system.  Increases memory reserved to accommodate various tables. | 	  system.  Increases memory reserved to accommodate various tables. | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| #ifndef _SPARC64_MMZONE_H | #ifndef _SPARC64_MMZONE_H | ||||||
| #define _SPARC64_MMZONE_H | #define _SPARC64_MMZONE_H | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| #include <linux/cpumask.h> | #include <linux/cpumask.h> | ||||||
| 
 | 
 | ||||||
|  | @ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; | ||||||
| extern int numa_cpu_lookup_table[]; | extern int numa_cpu_lookup_table[]; | ||||||
| extern cpumask_t numa_cpumask_lookup_table[]; | extern cpumask_t numa_cpumask_lookup_table[]; | ||||||
| 
 | 
 | ||||||
| #endif /* CONFIG_NEED_MULTIPLE_NODES */ | #endif /* CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| #endif /* _SPARC64_MMZONE_H */ | #endif /* _SPARC64_MMZONE_H */ | ||||||
|  |  | ||||||
|  | @ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, | ||||||
| 					size_t align) | 					size_t align) | ||||||
| { | { | ||||||
| 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int node = cpu_to_node(cpu); | 	int node = cpu_to_node(cpu); | ||||||
| 	void *ptr; | 	void *ptr; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -903,7 +903,7 @@ struct node_mem_mask { | ||||||
| static struct node_mem_mask node_masks[MAX_NUMNODES]; | static struct node_mem_mask node_masks[MAX_NUMNODES]; | ||||||
| static int num_node_masks; | static int num_node_masks; | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| struct mdesc_mlgroup { | struct mdesc_mlgroup { | ||||||
| 	u64	node; | 	u64	node; | ||||||
|  | @ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) | ||||||
| { | { | ||||||
| 	struct pglist_data *p; | 	struct pglist_data *p; | ||||||
| 	unsigned long start_pfn, end_pfn; | 	unsigned long start_pfn, end_pfn; | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| 	NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), | 	NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), | ||||||
| 					     SMP_CACHE_BYTES, nid); | 					     SMP_CACHE_BYTES, nid); | ||||||
|  | @ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) | ||||||
| 
 | 
 | ||||||
| static void init_node_masks_nonnuma(void) | static void init_node_masks_nonnuma(void) | ||||||
| { | { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int i; | 	int i; | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | @ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) | ||||||
| 	node_masks[0].match = 0; | 	node_masks[0].match = 0; | ||||||
| 	num_node_masks = 1; | 	num_node_masks = 1; | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	for (i = 0; i < NR_CPUS; i++) | 	for (i = 0; i < NR_CPUS; i++) | ||||||
| 		numa_cpu_lookup_table[i] = 0; | 		numa_cpu_lookup_table[i] = 0; | ||||||
| 
 | 
 | ||||||
|  | @ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| struct pglist_data *node_data[MAX_NUMNODES]; | struct pglist_data *node_data[MAX_NUMNODES]; | ||||||
| 
 | 
 | ||||||
| EXPORT_SYMBOL(numa_cpu_lookup_table); | EXPORT_SYMBOL(numa_cpu_lookup_table); | ||||||
|  | @ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) | ||||||
| 
 | 
 | ||||||
| static void __init register_page_bootmem_info(void) | static void __init register_page_bootmem_info(void) | ||||||
| { | { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int i; | 	int i; | ||||||
| 
 | 
 | ||||||
| 	for_each_online_node(i) | 	for_each_online_node(i) | ||||||
|  |  | ||||||
|  | @ -1597,7 +1597,7 @@ config NODES_SHIFT | ||||||
| 	default "10" if MAXSMP | 	default "10" if MAXSMP | ||||||
| 	default "6" if X86_64 | 	default "6" if X86_64 | ||||||
| 	default "3" | 	default "3" | ||||||
| 	depends on NEED_MULTIPLE_NODES | 	depends on NUMA | ||||||
| 	help | 	help | ||||||
| 	  Specify the maximum number of NUMA Nodes available on the target | 	  Specify the maximum number of NUMA Nodes available on the target | ||||||
| 	  system.  Increases memory reserved to accommodate various tables. | 	  system.  Increases memory reserved to accommodate various tables. | ||||||
|  |  | ||||||
|  | @ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); | ||||||
|  */ |  */ | ||||||
| static bool __init pcpu_need_numa(void) | static bool __init pcpu_need_numa(void) | ||||||
| { | { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	pg_data_t *last = NULL; | 	pg_data_t *last = NULL; | ||||||
| 	unsigned int cpu; | 	unsigned int cpu; | ||||||
| 
 | 
 | ||||||
|  | @ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, | ||||||
| 					unsigned long align) | 					unsigned long align) | ||||||
| { | { | ||||||
| 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | 	const unsigned long goal = __pa(MAX_DMA_ADDRESS); | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int node = early_cpu_to_node(cpu); | 	int node = early_cpu_to_node(cpu); | ||||||
| 	void *ptr; | 	void *ptr; | ||||||
| 
 | 
 | ||||||
|  | @ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) | ||||||
| 
 | 
 | ||||||
| static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) | static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) | ||||||
| { | { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	if (early_cpu_to_node(from) == early_cpu_to_node(to)) | 	if (early_cpu_to_node(from) == early_cpu_to_node(to)) | ||||||
| 		return LOCAL_DISTANCE; | 		return LOCAL_DISTANCE; | ||||||
| 	else | 	else | ||||||
|  |  | ||||||
|  | @ -651,7 +651,7 @@ void __init find_low_pfn_range(void) | ||||||
| 		highmem_pfn_init(); | 		highmem_pfn_init(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| void __init initmem_init(void) | void __init initmem_init(void) | ||||||
| { | { | ||||||
| #ifdef CONFIG_HIGHMEM | #ifdef CONFIG_HIGHMEM | ||||||
|  | @ -677,7 +677,7 @@ void __init initmem_init(void) | ||||||
| 
 | 
 | ||||||
| 	setup_bootmem_allocator(); | 	setup_bootmem_allocator(); | ||||||
| } | } | ||||||
| #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | #endif /* !CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| void __init setup_bootmem_allocator(void) | void __init setup_bootmem_allocator(void) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -45,7 +45,7 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef cpumask_of_node | #ifndef cpumask_of_node | ||||||
|   #ifdef CONFIG_NEED_MULTIPLE_NODES |   #ifdef CONFIG_NUMA | ||||||
|     #define cpumask_of_node(node)	((node) == 0 ? cpu_online_mask : cpu_none_mask) |     #define cpumask_of_node(node)	((node) == 0 ? cpu_online_mask : cpu_none_mask) | ||||||
|   #else |   #else | ||||||
|     #define cpumask_of_node(node)	((void)(node), cpu_online_mask) |     #define cpumask_of_node(node)	((void)(node), cpu_online_mask) | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ struct memblock_region { | ||||||
| 	phys_addr_t base; | 	phys_addr_t base; | ||||||
| 	phys_addr_t size; | 	phys_addr_t size; | ||||||
| 	enum memblock_flags flags; | 	enum memblock_flags flags; | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int nid; | 	int nid; | ||||||
| #endif | #endif | ||||||
| }; | }; | ||||||
|  | @ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); | ||||||
| int memblock_set_node(phys_addr_t base, phys_addr_t size, | int memblock_set_node(phys_addr_t base, phys_addr_t size, | ||||||
| 		      struct memblock_type *type, int nid); | 		      struct memblock_type *type, int nid); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| static inline void memblock_set_region_node(struct memblock_region *r, int nid) | static inline void memblock_set_region_node(struct memblock_region *r, int nid) | ||||||
| { | { | ||||||
| 	r->nid = nid; | 	r->nid = nid; | ||||||
|  | @ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) | ||||||
| { | { | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| #endif /* CONFIG_NEED_MULTIPLE_NODES */ | #endif /* CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| /* Flags for memblock allocation APIs */ | /* Flags for memblock allocation APIs */ | ||||||
| #define MEMBLOCK_ALLOC_ANYWHERE	(~(phys_addr_t)0) | #define MEMBLOCK_ALLOC_ANYWHERE	(~(phys_addr_t)0) | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; | ||||||
| 
 | 
 | ||||||
| void init_mm_internals(void); | void init_mm_internals(void); | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES	/* Don't use mapnrs, do it properly */ | #ifndef CONFIG_NUMA		/* Don't use mapnrs, do it properly */ | ||||||
| extern unsigned long max_mapnr; | extern unsigned long max_mapnr; | ||||||
| 
 | 
 | ||||||
| static inline void set_max_mapnr(unsigned long limit) | static inline void set_max_mapnr(unsigned long limit) | ||||||
|  | @ -2460,7 +2460,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, | ||||||
| 			unsigned long *start_pfn, unsigned long *end_pfn); | 			unsigned long *start_pfn, unsigned long *end_pfn); | ||||||
| extern unsigned long find_min_pfn_with_active_regions(void); | extern unsigned long find_min_pfn_with_active_regions(void); | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| static inline int early_pfn_to_nid(unsigned long pfn) | static inline int early_pfn_to_nid(unsigned long pfn) | ||||||
| { | { | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
|  | @ -1043,17 +1043,17 @@ extern int percpu_pagelist_high_fraction; | ||||||
| extern char numa_zonelist_order[]; | extern char numa_zonelist_order[]; | ||||||
| #define NUMA_ZONELIST_ORDER_LEN	16 | #define NUMA_ZONELIST_ORDER_LEN	16 | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| extern struct pglist_data contig_page_data; | extern struct pglist_data contig_page_data; | ||||||
| #define NODE_DATA(nid)		(&contig_page_data) | #define NODE_DATA(nid)		(&contig_page_data) | ||||||
| #define NODE_MEM_MAP(nid)	mem_map | #define NODE_MEM_MAP(nid)	mem_map | ||||||
| 
 | 
 | ||||||
| #else /* CONFIG_NEED_MULTIPLE_NODES */ | #else /* CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| #include <asm/mmzone.h> | #include <asm/mmzone.h> | ||||||
| 
 | 
 | ||||||
| #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | #endif /* !CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| extern struct pglist_data *first_online_pgdat(void); | extern struct pglist_data *first_online_pgdat(void); | ||||||
| extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); | extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); | ||||||
|  |  | ||||||
|  | @ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) | ||||||
| 	VMCOREINFO_SYMBOL(_stext); | 	VMCOREINFO_SYMBOL(_stext); | ||||||
| 	VMCOREINFO_SYMBOL(vmap_area_list); | 	VMCOREINFO_SYMBOL(vmap_area_list); | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| 	VMCOREINFO_SYMBOL(mem_map); | 	VMCOREINFO_SYMBOL(mem_map); | ||||||
| 	VMCOREINFO_SYMBOL(contig_page_data); | 	VMCOREINFO_SYMBOL(contig_page_data); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 	depends on !SPARSEMEM | 	depends on !SPARSEMEM | ||||||
| 
 | 
 | ||||||
| # |  | ||||||
| # Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's |  | ||||||
| # to represent different areas of memory.  This variable allows |  | ||||||
| # those dependencies to exist individually. |  | ||||||
| # |  | ||||||
| config NEED_MULTIPLE_NODES |  | ||||||
| 	def_bool y |  | ||||||
| 	depends on NUMA |  | ||||||
| 
 |  | ||||||
| # | # | ||||||
| # SPARSEMEM_EXTREME (which is the default) does some bootmem | # SPARSEMEM_EXTREME (which is the default) does some bootmem | ||||||
| # allocations when sparse_init() is called.  If this cannot | # allocations when sparse_init() is called.  If this cannot | ||||||
|  |  | ||||||
|  | @ -92,7 +92,7 @@ | ||||||
|  * system initialization completes. |  * system initialization completes. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| struct pglist_data __refdata contig_page_data; | struct pglist_data __refdata contig_page_data; | ||||||
| EXPORT_SYMBOL(contig_page_data); | EXPORT_SYMBOL(contig_page_data); | ||||||
| #endif | #endif | ||||||
|  | @ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, | ||||||
| 		 * area, insert that portion. | 		 * area, insert that portion. | ||||||
| 		 */ | 		 */ | ||||||
| 		if (rbase > base) { | 		if (rbase > base) { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 			WARN_ON(nid != memblock_get_region_node(rgn)); | 			WARN_ON(nid != memblock_get_region_node(rgn)); | ||||||
| #endif | #endif | ||||||
| 			WARN_ON(flags != rgn->flags); | 			WARN_ON(flags != rgn->flags); | ||||||
|  | @ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, | ||||||
| int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, | int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, | ||||||
| 				      struct memblock_type *type, int nid) | 				      struct memblock_type *type, int nid) | ||||||
| { | { | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 	int start_rgn, end_rgn; | 	int start_rgn, end_rgn; | ||||||
| 	int i, ret; | 	int i, ret; | ||||||
| 
 | 
 | ||||||
|  | @ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) | ||||||
| 		size = rgn->size; | 		size = rgn->size; | ||||||
| 		end = base + size - 1; | 		end = base + size - 1; | ||||||
| 		flags = rgn->flags; | 		flags = rgn->flags; | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 		if (memblock_get_region_node(rgn) != MAX_NUMNODES) | 		if (memblock_get_region_node(rgn) != MAX_NUMNODES) | ||||||
| 			snprintf(nid_buf, sizeof(nid_buf), " on node %d", | 			snprintf(nid_buf, sizeof(nid_buf), " on node %d", | ||||||
| 				 memblock_get_region_node(rgn)); | 				 memblock_get_region_node(rgn)); | ||||||
|  |  | ||||||
|  | @ -90,8 +90,7 @@ | ||||||
| #warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid. | #warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid. | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| /* use the per-pgdat data instead for discontigmem - mbligh */ |  | ||||||
| unsigned long max_mapnr; | unsigned long max_mapnr; | ||||||
| EXPORT_SYMBOL(max_mapnr); | EXPORT_SYMBOL(max_mapnr); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1634,7 +1634,7 @@ void __free_pages_core(struct page *page, unsigned int order) | ||||||
| 	__free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); | 	__free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NEED_MULTIPLE_NODES | #ifdef CONFIG_NUMA | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * During memory init memblocks map pfns to nids. The search is expensive and |  * During memory init memblocks map pfns to nids. The search is expensive and | ||||||
|  | @ -1684,7 +1684,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) | ||||||
| 
 | 
 | ||||||
| 	return nid; | 	return nid; | ||||||
| } | } | ||||||
| #endif /* CONFIG_NEED_MULTIPLE_NODES */ | #endif /* CONFIG_NUMA */ | ||||||
| 
 | 
 | ||||||
| void __init memblock_free_pages(struct page *page, unsigned long pfn, | void __init memblock_free_pages(struct page *page, unsigned long pfn, | ||||||
| 							unsigned int order) | 							unsigned int order) | ||||||
|  | @ -7438,7 +7438,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) | ||||||
| 	pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", | 	pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", | ||||||
| 				__func__, pgdat->node_id, (unsigned long)pgdat, | 				__func__, pgdat->node_id, (unsigned long)pgdat, | ||||||
| 				(unsigned long)pgdat->node_mem_map); | 				(unsigned long)pgdat->node_mem_map); | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * With no DISCONTIG, the global mem_map is just set as node 0's | 	 * With no DISCONTIG, the global mem_map is just set as node 0's | ||||||
| 	 */ | 	 */ | ||||||
|  |  | ||||||
|  | @ -346,7 +346,7 @@ size_t mem_section_usage_size(void) | ||||||
| 
 | 
 | ||||||
| static inline phys_addr_t pgdat_to_phys(struct pglist_data *pgdat) | static inline phys_addr_t pgdat_to_phys(struct pglist_data *pgdat) | ||||||
| { | { | ||||||
| #ifndef CONFIG_NEED_MULTIPLE_NODES | #ifndef CONFIG_NUMA | ||||||
| 	return __pa_symbol(pgdat); | 	return __pa_symbol(pgdat); | ||||||
| #else | #else | ||||||
| 	return __pa(pgdat); | 	return __pa(pgdat); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Mike Rapoport
						Mike Rapoport