Skip to content

Commit 43b02ba

Browse files
rppttorvalds
authored andcommitted
mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM
After removal of the DISCONTIGMEM memory model the FLAT_NODE_MEM_MAP configuration option is equivalent to FLATMEM. Drop CONFIG_FLAT_NODE_MEM_MAP and use CONFIG_FLATMEM instead. 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 a9ee6cf commit 43b02ba

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

include/linux/mmzone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ typedef struct pglist_data {
788788
struct zonelist node_zonelists[MAX_ZONELISTS];
789789

790790
int nr_zones; /* number of populated zones in this node */
791-
#ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */
791+
#ifdef CONFIG_FLATMEM /* means !SPARSEMEM */
792792
struct page *node_mem_map;
793793
#ifdef CONFIG_PAGE_EXTENSION
794794
struct page_ext *node_page_ext;
@@ -878,7 +878,7 @@ typedef struct pglist_data {
878878

879879
#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
880880
#define node_spanned_pages(nid) (NODE_DATA(nid)->node_spanned_pages)
881-
#ifdef CONFIG_FLAT_NODE_MEM_MAP
881+
#ifdef CONFIG_FLATMEM
882882
#define pgdat_page_nr(pgdat, pagenr) ((pgdat)->node_mem_map + (pagenr))
883883
#else
884884
#define pgdat_page_nr(pgdat, pagenr) pfn_to_page((pgdat)->node_start_pfn + (pagenr))

kernel/crash_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static int __init crash_save_vmcoreinfo_init(void)
484484
VMCOREINFO_OFFSET(page, compound_head);
485485
VMCOREINFO_OFFSET(pglist_data, node_zones);
486486
VMCOREINFO_OFFSET(pglist_data, nr_zones);
487-
#ifdef CONFIG_FLAT_NODE_MEM_MAP
487+
#ifdef CONFIG_FLATMEM
488488
VMCOREINFO_OFFSET(pglist_data, node_mem_map);
489489
#endif
490490
VMCOREINFO_OFFSET(pglist_data, node_start_pfn);

mm/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ config FLATMEM
5555
def_bool y
5656
depends on !SPARSEMEM || FLATMEM_MANUAL
5757

58-
config FLAT_NODE_MEM_MAP
59-
def_bool y
60-
depends on !SPARSEMEM
61-
6258
#
6359
# SPARSEMEM_EXTREME (which is the default) does some bootmem
6460
# allocations when sparse_init() is called. If this cannot

mm/page_alloc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6547,7 +6547,7 @@ static void __meminit zone_init_free_lists(struct zone *zone)
65476547
}
65486548
}
65496549

6550-
#if !defined(CONFIG_FLAT_NODE_MEM_MAP)
6550+
#if !defined(CONFIG_FLATMEM)
65516551
/*
65526552
* Only struct pages that correspond to ranges defined by memblock.memory
65536553
* are zeroed and initialized by going through __init_single_page() during
@@ -7403,7 +7403,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat)
74037403
}
74047404
}
74057405

7406-
#ifdef CONFIG_FLAT_NODE_MEM_MAP
7406+
#ifdef CONFIG_FLATMEM
74077407
static void __ref alloc_node_mem_map(struct pglist_data *pgdat)
74087408
{
74097409
unsigned long __maybe_unused start = 0;
@@ -7451,7 +7451,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat)
74517451
}
74527452
#else
74537453
static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { }
7454-
#endif /* CONFIG_FLAT_NODE_MEM_MAP */
7454+
#endif /* CONFIG_FLATMEM */
74557455

74567456
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
74577457
static inline void pgdat_set_deferred_range(pg_data_t *pgdat)

mm/page_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void __init page_ext_init_flatmem(void)
191191
panic("Out of memory");
192192
}
193193

194-
#else /* CONFIG_FLAT_NODE_MEM_MAP */
194+
#else /* CONFIG_FLATMEM */
195195

196196
struct page_ext *lookup_page_ext(const struct page *page)
197197
{

0 commit comments

Comments
 (0)