Skip to content

Commit acd3f5c

Browse files
rppttorvalds
authored andcommitted
mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES
The memmap_init() function was made to iterate over memblock regions and as the result the early_pfn_in_nid() function became obsolete. Since CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub or a real implementation of early_pfn_in_nid(), it is also not needed anymore. Remove both early_pfn_in_nid() and the CONFIG_NODES_SPAN_OTHER_NODES. Co-developed-by: Hoan Tran <[email protected]> Signed-off-by: Hoan Tran <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Tested-by: Hoan Tran <[email protected]> [arm64] Cc: Baoquan He <[email protected]> Cc: Brian Cain <[email protected]> Cc: Catalin Marinas <[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 73a6e47 commit acd3f5c

File tree

4 files changed

+0
-47
lines changed

4 files changed

+0
-47
lines changed

arch/powerpc/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,6 @@ config ARCH_MEMORY_PROBE
686686
def_bool y
687687
depends on MEMORY_HOTPLUG
688688

689-
# Some NUMA nodes have memory ranges that span
690-
# other nodes. Even though a pfn is valid and
691-
# between a node's start and end pfns, it may not
692-
# reside on that node. See memmap_init_zone()
693-
# for details.
694-
config NODES_SPAN_OTHER_NODES
695-
def_bool y
696-
depends on NEED_MULTIPLE_NODES
697-
698689
config STDBINUTILS
699690
bool "Using standard binutils settings"
700691
depends on 44x

arch/sparc/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,6 @@ config NODES_SHIFT
286286
Specify the maximum number of NUMA Nodes available on the target
287287
system. Increases memory reserved to accommodate various tables.
288288

289-
# Some NUMA nodes have memory ranges that span
290-
# other nodes. Even though a pfn is valid and
291-
# between a node's start and end pfns, it may not
292-
# reside on that node. See memmap_init_zone()
293-
# for details.
294-
config NODES_SPAN_OTHER_NODES
295-
def_bool y
296-
depends on NEED_MULTIPLE_NODES
297-
298289
config ARCH_SPARSEMEM_ENABLE
299290
def_bool y if SPARC64
300291
select SPARSEMEM_VMEMMAP_ENABLE

arch/x86/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,15 +1583,6 @@ config X86_64_ACPI_NUMA
15831583
---help---
15841584
Enable ACPI SRAT based node topology detection.
15851585

1586-
# Some NUMA nodes have memory ranges that span
1587-
# other nodes. Even though a pfn is valid and
1588-
# between a node's start and end pfns, it may not
1589-
# reside on that node. See memmap_init_zone()
1590-
# for details.
1591-
config NODES_SPAN_OTHER_NODES
1592-
def_bool y
1593-
depends on X86_64_ACPI_NUMA
1594-
15951586
config NUMA_EMU
15961587
bool "NUMA emulation"
15971588
depends on NUMA

mm/page_alloc.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,26 +1541,6 @@ int __meminit early_pfn_to_nid(unsigned long pfn)
15411541
}
15421542
#endif /* CONFIG_NEED_MULTIPLE_NODES */
15431543

1544-
#ifdef CONFIG_NODES_SPAN_OTHER_NODES
1545-
/* Only safe to use early in boot when initialisation is single-threaded */
1546-
static inline bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
1547-
{
1548-
int nid;
1549-
1550-
nid = __early_pfn_to_nid(pfn, &early_pfnnid_cache);
1551-
if (nid >= 0 && nid != node)
1552-
return false;
1553-
return true;
1554-
}
1555-
1556-
#else
1557-
static inline bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
1558-
{
1559-
return true;
1560-
}
1561-
#endif
1562-
1563-
15641544
void __init memblock_free_pages(struct page *page, unsigned long pfn,
15651545
unsigned int order)
15661546
{

0 commit comments

Comments
 (0)