Skip to content

Commit fc5d107

Browse files
rientjesingomolnar
authored andcommitted
x86/mm/32: Remove unused node_memmap_size_bytes() & CONFIG_NEED_NODE_MEMMAP_SIZE logic
node_memmap_size_bytes() has been unused since the v3.9 kernel, so remove it. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mm@kvack.org Fixes: f03574f ("x86-32, mm: Rip out x86_32 NUMA remapping code") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803262325540.256524@chino.kir.corp.google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 0bc91d4 commit fc5d107

4 files changed

Lines changed: 0 additions & 42 deletions

File tree

‎arch/x86/Kconfig‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,10 +1608,6 @@ config ARCH_HAVE_MEMORY_PRESENT
16081608
def_bool y
16091609
depends on X86_32 && DISCONTIGMEM
16101610

1611-
config NEED_NODE_MEMMAP_SIZE
1612-
def_bool y
1613-
depends on X86_32 && (DISCONTIGMEM || SPARSEMEM)
1614-
16151611
config ARCH_FLATMEM_ENABLE
16161612
def_bool y
16171613
depends on X86_32 && !NUMA

‎arch/x86/mm/numa_32.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ void memory_present(int nid, unsigned long start, unsigned long end)
6060
}
6161
printk(KERN_CONT "\n");
6262
}
63-
64-
unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn,
65-
unsigned long end_pfn)
66-
{
67-
unsigned long nr_pages = end_pfn - start_pfn;
68-
69-
if (!nr_pages)
70-
return 0;
71-
72-
return (nr_pages + 1) * sizeof(struct page);
73-
}
7463
#endif
7564

7665
extern unsigned long highend_pfn, highstart_pfn;

‎include/linux/mmzone.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,6 @@ int local_memory_node(int node_id);
816816
static inline int local_memory_node(int node_id) { return node_id; };
817817
#endif
818818

819-
#ifdef CONFIG_NEED_NODE_MEMMAP_SIZE
820-
unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
821-
#endif
822-
823819
/*
824820
* zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
825821
*/
@@ -1289,7 +1285,6 @@ struct mminit_pfnnid_cache {
12891285
#endif
12901286

12911287
void memory_present(int nid, unsigned long start, unsigned long end);
1292-
unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
12931288

12941289
/*
12951290
* If it is possible to have holes within a MAX_ORDER_NR_PAGES, then we

‎mm/sparse.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -235,28 +235,6 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
235235
}
236236
}
237237

238-
/*
239-
* Only used by the i386 NUMA architecures, but relatively
240-
* generic code.
241-
*/
242-
unsigned long __init node_memmap_size_bytes(int nid, unsigned long start_pfn,
243-
unsigned long end_pfn)
244-
{
245-
unsigned long pfn;
246-
unsigned long nr_pages = 0;
247-
248-
mminit_validate_memmodel_limits(&start_pfn, &end_pfn);
249-
for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
250-
if (nid != early_pfn_to_nid(pfn))
251-
continue;
252-
253-
if (pfn_present(pfn))
254-
nr_pages += PAGES_PER_SECTION;
255-
}
256-
257-
return nr_pages * sizeof(struct page);
258-
}
259-
260238
/*
261239
* Subtle, we encode the real pfn into the mem_map such that
262240
* the identity pfn - section_mem_map will return the actual

0 commit comments

Comments
 (0)