Skip to content

Commit 3f08a30

Browse files
rppttorvalds
authored andcommitted
mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option
CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization of nodes and zones structures between the systems that have region to node mapping in memblock and those that don't. Currently all the NUMA architectures enable this option and for the non-NUMA systems we can presume that all the memory belongs to node 0 and therefore the compile time configuration option is not required. The remaining few architectures that use DISCONTIGMEM without NUMA are easily updated to use memblock_add_node() instead of memblock_add() and thus have proper correspondence of memblock regions to NUMA nodes. Still, free_area_init_node() must have a backward compatible version because its semantics with and without CONFIG_HAVE_MEMBLOCK_NODE_MAP is different. Once all the architectures will use the new semantics, the entire compatibility layer can be dropped. To avoid addition of extra run time memory to store node id for architectures that keep memblock but have only a single node, the node id field of the memblock_region is guarded by CONFIG_NEED_MULTIPLE_NODES and the corresponding accessors presume that in those cases it is always 0. Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Tested-by: Hoan Tran <[email protected]> [arm64] Acked-by: Catalin Marinas <[email protected]> [arm64] Cc: Baoquan He <[email protected]> Cc: Brian Cain <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Guo Ren <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Matt Turner <[email protected]> Cc: Max Filippov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Michal Simek <[email protected]> Cc: Nick Hu <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Stafford Horne <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Yoshinori Sato <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6f24fbd commit 3f08a30

File tree

20 files changed

+74
-119
lines changed

20 files changed

+74
-119
lines changed

Documentation/features/vm/numa-memblock/arch-support.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.

arch/alpha/mm/numa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ setup_memory_node(int nid, void *kernel_end)
144144
if (!nid && (node_max_pfn < end_kernel_pfn || node_min_pfn > start_kernel_pfn))
145145
panic("kernel loaded out of ram");
146146

147-
memblock_add(PFN_PHYS(node_min_pfn),
148-
(node_max_pfn - node_min_pfn) << PAGE_SHIFT);
147+
memblock_add_node(PFN_PHYS(node_min_pfn),
148+
(node_max_pfn - node_min_pfn) << PAGE_SHIFT, nid);
149149

150150
/* Zone start phys-addr must be 2^(MAX_ORDER-1) aligned.
151151
Note that we round this down, not up - node memory

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ config ARM64
162162
select HAVE_GCC_PLUGINS
163163
select HAVE_HW_BREAKPOINT if PERF_EVENTS
164164
select HAVE_IRQ_TIME_ACCOUNTING
165-
select HAVE_MEMBLOCK_NODE_MAP if NUMA
166165
select HAVE_NMI
167166
select HAVE_PATA_PLATFORM
168167
select HAVE_PERF_EVENTS

arch/ia64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ config IA64
3131
select HAVE_FUNCTION_TRACER
3232
select TTY
3333
select HAVE_ARCH_TRACEHOOK
34-
select HAVE_MEMBLOCK_NODE_MAP
3534
select HAVE_VIRT_CPU_ACCOUNTING
3635
select DMA_NONCOHERENT_MMAP
3736
select ARCH_HAS_SYNC_DMA_FOR_CPU

arch/m68k/mm/motorola.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ void __init paging_init(void)
386386

387387
min_addr = m68k_memory[0].addr;
388388
max_addr = min_addr + m68k_memory[0].size;
389-
memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
389+
memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
390390
for (i = 1; i < m68k_num_memory;) {
391391
if (m68k_memory[i].addr < min_addr) {
392392
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
@@ -397,7 +397,7 @@ void __init paging_init(void)
397397
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
398398
continue;
399399
}
400-
memblock_add(m68k_memory[i].addr, m68k_memory[i].size);
400+
memblock_add_node(m68k_memory[i].addr, m68k_memory[i].size, i);
401401
addr = m68k_memory[i].addr + m68k_memory[i].size;
402402
if (addr > max_addr)
403403
max_addr = addr;

arch/microblaze/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ config MICROBLAZE
3232
select HAVE_FTRACE_MCOUNT_RECORD
3333
select HAVE_FUNCTION_GRAPH_TRACER
3434
select HAVE_FUNCTION_TRACER
35-
select HAVE_MEMBLOCK_NODE_MAP
3635
select HAVE_OPROFILE
3736
select HAVE_PCI
3837
select IRQ_DOMAIN

arch/mips/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ config MIPS
7272
select HAVE_KPROBES
7373
select HAVE_KRETPROBES
7474
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
75-
select HAVE_MEMBLOCK_NODE_MAP
7675
select HAVE_MOD_ARCH_SPECIFIC
7776
select HAVE_NMI
7877
select HAVE_OPROFILE

arch/powerpc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ config PPC
211211
select HAVE_KRETPROBES
212212
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
213213
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
214-
select HAVE_MEMBLOCK_NODE_MAP
215214
select HAVE_MOD_ARCH_SPECIFIC
216215
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
217216
select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)

arch/riscv/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ config RISCV
3232
select HAVE_ARCH_AUDITSYSCALL
3333
select HAVE_ARCH_SECCOMP_FILTER
3434
select HAVE_ASM_MODVERSIONS
35-
select HAVE_MEMBLOCK_NODE_MAP
3635
select HAVE_DMA_CONTIGUOUS if MMU
3736
select HAVE_FUTEX_CMPXCHG if FUTEX
3837
select HAVE_PERF_EVENTS

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ config S390
162162
select HAVE_LIVEPATCH
163163
select HAVE_PERF_REGS
164164
select HAVE_PERF_USER_STACK_DUMP
165-
select HAVE_MEMBLOCK_NODE_MAP
166165
select HAVE_MEMBLOCK_PHYS_MAP
167166
select MMU_GATHER_NO_GATHER
168167
select HAVE_MOD_ARCH_SPECIFIC

0 commit comments

Comments
 (0)