Skip to content

Commit a9ee6cf

Browse files
rppttorvalds
authored andcommitted
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. [[email protected]: fix arm boot crash] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Matt Turner <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Vineet Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 48d9f33 commit a9ee6cf

File tree

36 files changed

+59
-69
lines changed

36 files changed

+59
-69
lines changed

arch/arm64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ config NODES_SHIFT
10351035
int "Maximum NUMA Nodes (as a power of 2)"
10361036
range 1 10
10371037
default "4"
1038-
depends on NEED_MULTIPLE_NODES
1038+
depends on NUMA
10391039
help
10401040
Specify the maximum number of NUMA Nodes available on the target
10411041
system. Increases memory reserved to accommodate various tables.

arch/ia64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ config NODES_SHIFT
302302
int "Max num nodes shift(3-10)"
303303
range 3 10
304304
default "10"
305-
depends on NEED_MULTIPLE_NODES
305+
depends on NUMA
306306
help
307307
This option specifies the maximum number of nodes in your SSI system.
308308
MAX_NUMNODES will be 2^(This value).

arch/mips/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET
28672867
config NODES_SHIFT
28682868
int
28692869
default "6"
2870-
depends on NEED_MULTIPLE_NODES
2870+
depends on NUMA
28712871

28722872
config HW_PERF_EVENTS
28732873
bool "Enable hardware performance counter support for perf events"

arch/mips/include/asm/mmzone.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <asm/page.h>
1010

11-
#ifdef CONFIG_NEED_MULTIPLE_NODES
11+
#ifdef CONFIG_NUMA
1212
# include <mmzone.h>
1313
#endif
1414

arch/mips/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn)
239239

240240
/* pfn_valid is defined in linux/mmzone.h */
241241

242-
#elif defined(CONFIG_NEED_MULTIPLE_NODES)
242+
#elif defined(CONFIG_NUMA)
243243

244244
#define pfn_valid(pfn) \
245245
({ \

arch/mips/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void maar_init(void)
394394
}
395395
}
396396

397-
#ifndef CONFIG_NEED_MULTIPLE_NODES
397+
#ifndef CONFIG_NUMA
398398
void __init paging_init(void)
399399
{
400400
unsigned long max_zone_pfns[MAX_NR_ZONES];
@@ -473,7 +473,7 @@ void __init mem_init(void)
473473
0x80000000 - 4, KCORE_TEXT);
474474
#endif
475475
}
476-
#endif /* !CONFIG_NEED_MULTIPLE_NODES */
476+
#endif /* !CONFIG_NUMA */
477477

478478
void free_init_pages(const char *what, unsigned long begin, unsigned long end)
479479
{

arch/powerpc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ config NODES_SHIFT
671671
int
672672
default "8" if PPC64
673673
default "4"
674-
depends on NEED_MULTIPLE_NODES
674+
depends on NUMA
675675

676676
config USE_PERCPU_NUMA_NODE_ID
677677
def_bool y

arch/powerpc/include/asm/mmzone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* flags field of the struct page
1919
*/
2020

21-
#ifdef CONFIG_NEED_MULTIPLE_NODES
21+
#ifdef CONFIG_NUMA
2222

2323
extern struct pglist_data *node_data[];
2424
/*
@@ -41,7 +41,7 @@ u64 memory_hotplug_max(void);
4141

4242
#else
4343
#define memory_hotplug_max() memblock_end_of_DRAM()
44-
#endif /* CONFIG_NEED_MULTIPLE_NODES */
44+
#endif /* CONFIG_NUMA */
4545
#ifdef CONFIG_FA_DUMP
4646
#define __HAVE_ARCH_RESERVED_KERNEL_PAGES
4747
#endif

arch/powerpc/kernel/setup_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size,
788788
size_t align)
789789
{
790790
const unsigned long goal = __pa(MAX_DMA_ADDRESS);
791-
#ifdef CONFIG_NEED_MULTIPLE_NODES
791+
#ifdef CONFIG_NUMA
792792
int node = early_cpu_to_node(cpu);
793793
void *ptr;
794794

arch/powerpc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
10471047
zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu),
10481048
GFP_KERNEL, cpu_to_node(cpu));
10491049

1050-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1050+
#ifdef CONFIG_NUMA
10511051
/*
10521052
* numa_node_id() works after this.
10531053
*/

arch/powerpc/kexec/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image)
6868
void arch_crash_save_vmcoreinfo(void)
6969
{
7070

71-
#ifdef CONFIG_NEED_MULTIPLE_NODES
71+
#ifdef CONFIG_NUMA
7272
VMCOREINFO_SYMBOL(node_data);
7373
VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
7474
#endif
75-
#ifndef CONFIG_NEED_MULTIPLE_NODES
75+
#ifndef CONFIG_NUMA
7676
VMCOREINFO_SYMBOL(contig_page_data);
7777
#endif
7878
#if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP)

arch/powerpc/mm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \
1313
obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/
1414
obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/
1515
obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/
16-
obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
16+
obj-$(CONFIG_NUMA) += numa.o
1717
obj-$(CONFIG_PPC_MM_SLICES) += slice.o
1818
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
1919
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o

arch/powerpc/mm/mem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size,
127127
}
128128
#endif
129129

130-
#ifndef CONFIG_NEED_MULTIPLE_NODES
130+
#ifndef CONFIG_NUMA
131131
void __init mem_topology_setup(void)
132132
{
133133
max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
@@ -162,7 +162,7 @@ static int __init mark_nonram_nosave(void)
162162

163163
return 0;
164164
}
165-
#else /* CONFIG_NEED_MULTIPLE_NODES */
165+
#else /* CONFIG_NUMA */
166166
static int __init mark_nonram_nosave(void)
167167
{
168168
return 0;

arch/riscv/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ config NODES_SHIFT
332332
int "Maximum NUMA Nodes (as a power of 2)"
333333
range 1 10
334334
default "2"
335-
depends on NEED_MULTIPLE_NODES
335+
depends on NUMA
336336
help
337337
Specify the maximum number of NUMA Nodes available on the target
338338
system. Increases memory reserved to accommodate various tables.

arch/s390/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ config NUMA
475475

476476
config NODES_SHIFT
477477
int
478-
depends on NEED_MULTIPLE_NODES
478+
depends on NUMA
479479
default "1"
480480

481481
config SCHED_SMT

arch/sh/include/asm/mmzone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef __ASM_SH_MMZONE_H
33
#define __ASM_SH_MMZONE_H
44

5-
#ifdef CONFIG_NEED_MULTIPLE_NODES
5+
#ifdef CONFIG_NUMA
66
#include <linux/numa.h>
77

88
extern struct pglist_data *node_data[];
@@ -31,7 +31,7 @@ static inline void
3131
setup_bootmem_node(int nid, unsigned long start, unsigned long end)
3232
{
3333
}
34-
#endif /* CONFIG_NEED_MULTIPLE_NODES */
34+
#endif /* CONFIG_NUMA */
3535

3636
/* Platform specific mem init */
3737
void __init plat_mem_setup(void);

arch/sh/kernel/topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int __init topology_init(void)
4646
{
4747
int i, ret;
4848

49-
#ifdef CONFIG_NEED_MULTIPLE_NODES
49+
#ifdef CONFIG_NUMA
5050
for_each_online_node(i)
5151
register_one_node(i);
5252
#endif

arch/sh/mm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ config NODES_SHIFT
120120
int
121121
default "3" if CPU_SUBTYPE_SHX3
122122
default "1"
123-
depends on NEED_MULTIPLE_NODES
123+
depends on NUMA
124124

125125
config ARCH_FLATMEM_ENABLE
126126
def_bool y

arch/sh/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid)
211211

212212
get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
213213

214-
#ifdef CONFIG_NEED_MULTIPLE_NODES
214+
#ifdef CONFIG_NUMA
215215
NODE_DATA(nid) = memblock_alloc_try_nid(
216216
sizeof(struct pglist_data),
217217
SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT,

arch/sparc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ config NODES_SHIFT
265265
int "Maximum NUMA Nodes (as a power of 2)"
266266
range 4 5 if SPARC64
267267
default "5"
268-
depends on NEED_MULTIPLE_NODES
268+
depends on NUMA
269269
help
270270
Specify the maximum number of NUMA Nodes available on the target
271271
system. Increases memory reserved to accommodate various tables.

arch/sparc/include/asm/mmzone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _SPARC64_MMZONE_H
33
#define _SPARC64_MMZONE_H
44

5-
#ifdef CONFIG_NEED_MULTIPLE_NODES
5+
#ifdef CONFIG_NUMA
66

77
#include <linux/cpumask.h>
88

@@ -13,6 +13,6 @@ extern struct pglist_data *node_data[];
1313
extern int numa_cpu_lookup_table[];
1414
extern cpumask_t numa_cpumask_lookup_table[];
1515

16-
#endif /* CONFIG_NEED_MULTIPLE_NODES */
16+
#endif /* CONFIG_NUMA */
1717

1818
#endif /* _SPARC64_MMZONE_H */

arch/sparc/kernel/smp_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size,
15461546
size_t align)
15471547
{
15481548
const unsigned long goal = __pa(MAX_DMA_ADDRESS);
1549-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1549+
#ifdef CONFIG_NUMA
15501550
int node = cpu_to_node(cpu);
15511551
void *ptr;
15521552

arch/sparc/mm/init_64.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ struct node_mem_mask {
903903
static struct node_mem_mask node_masks[MAX_NUMNODES];
904904
static int num_node_masks;
905905

906-
#ifdef CONFIG_NEED_MULTIPLE_NODES
906+
#ifdef CONFIG_NUMA
907907

908908
struct mdesc_mlgroup {
909909
u64 node;
@@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid)
10591059
{
10601060
struct pglist_data *p;
10611061
unsigned long start_pfn, end_pfn;
1062-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1062+
#ifdef CONFIG_NUMA
10631063

10641064
NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data),
10651065
SMP_CACHE_BYTES, nid);
@@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid)
10801080

10811081
static void init_node_masks_nonnuma(void)
10821082
{
1083-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1083+
#ifdef CONFIG_NUMA
10841084
int i;
10851085
#endif
10861086

@@ -1090,15 +1090,15 @@ static void init_node_masks_nonnuma(void)
10901090
node_masks[0].match = 0;
10911091
num_node_masks = 1;
10921092

1093-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1093+
#ifdef CONFIG_NUMA
10941094
for (i = 0; i < NR_CPUS; i++)
10951095
numa_cpu_lookup_table[i] = 0;
10961096

10971097
cpumask_setall(&numa_cpumask_lookup_table[0]);
10981098
#endif
10991099
}
11001100

1101-
#ifdef CONFIG_NEED_MULTIPLE_NODES
1101+
#ifdef CONFIG_NUMA
11021102
struct pglist_data *node_data[MAX_NUMNODES];
11031103

11041104
EXPORT_SYMBOL(numa_cpu_lookup_table);
@@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr)
24872487

24882488
static void __init register_page_bootmem_info(void)
24892489
{
2490-
#ifdef CONFIG_NEED_MULTIPLE_NODES
2490+
#ifdef CONFIG_NUMA
24912491
int i;
24922492

24932493
for_each_online_node(i)

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ config NODES_SHIFT
15971597
default "10" if MAXSMP
15981598
default "6" if X86_64
15991599
default "3"
1600-
depends on NEED_MULTIPLE_NODES
1600+
depends on NUMA
16011601
help
16021602
Specify the maximum number of NUMA Nodes available on the target
16031603
system. Increases memory reserved to accommodate various tables.

arch/x86/kernel/setup_percpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset);
6666
*/
6767
static bool __init pcpu_need_numa(void)
6868
{
69-
#ifdef CONFIG_NEED_MULTIPLE_NODES
69+
#ifdef CONFIG_NUMA
7070
pg_data_t *last = NULL;
7171
unsigned int cpu;
7272

@@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size,
101101
unsigned long align)
102102
{
103103
const unsigned long goal = __pa(MAX_DMA_ADDRESS);
104-
#ifdef CONFIG_NEED_MULTIPLE_NODES
104+
#ifdef CONFIG_NUMA
105105
int node = early_cpu_to_node(cpu);
106106
void *ptr;
107107

@@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size)
140140

141141
static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
142142
{
143-
#ifdef CONFIG_NEED_MULTIPLE_NODES
143+
#ifdef CONFIG_NUMA
144144
if (early_cpu_to_node(from) == early_cpu_to_node(to))
145145
return LOCAL_DISTANCE;
146146
else

arch/x86/mm/init_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ void __init find_low_pfn_range(void)
651651
highmem_pfn_init();
652652
}
653653

654-
#ifndef CONFIG_NEED_MULTIPLE_NODES
654+
#ifndef CONFIG_NUMA
655655
void __init initmem_init(void)
656656
{
657657
#ifdef CONFIG_HIGHMEM
@@ -677,7 +677,7 @@ void __init initmem_init(void)
677677

678678
setup_bootmem_allocator();
679679
}
680-
#endif /* !CONFIG_NEED_MULTIPLE_NODES */
680+
#endif /* !CONFIG_NUMA */
681681

682682
void __init setup_bootmem_allocator(void)
683683
{

include/asm-generic/topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#endif
4646

4747
#ifndef cpumask_of_node
48-
#ifdef CONFIG_NEED_MULTIPLE_NODES
48+
#ifdef CONFIG_NUMA
4949
#define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask)
5050
#else
5151
#define cpumask_of_node(node) ((void)(node), cpu_online_mask)

include/linux/memblock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct memblock_region {
5050
phys_addr_t base;
5151
phys_addr_t size;
5252
enum memblock_flags flags;
53-
#ifdef CONFIG_NEED_MULTIPLE_NODES
53+
#ifdef CONFIG_NUMA
5454
int nid;
5555
#endif
5656
};
@@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask);
347347
int memblock_set_node(phys_addr_t base, phys_addr_t size,
348348
struct memblock_type *type, int nid);
349349

350-
#ifdef CONFIG_NEED_MULTIPLE_NODES
350+
#ifdef CONFIG_NUMA
351351
static inline void memblock_set_region_node(struct memblock_region *r, int nid)
352352
{
353353
r->nid = nid;
@@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r)
366366
{
367367
return 0;
368368
}
369-
#endif /* CONFIG_NEED_MULTIPLE_NODES */
369+
#endif /* CONFIG_NUMA */
370370

371371
/* Flags for memblock allocation APIs */
372372
#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)

0 commit comments

Comments
 (0)