aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Kconfig4
-rw-r--r--arch/x86/mm/numa_32.c11
-rw-r--r--include/linux/mmzone.h5
-rw-r--r--mm/sparse.c22
4 files changed, 0 insertions, 42 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 18233e459bff..739aff253d17 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1608,10 +1608,6 @@ config ARCH_HAVE_MEMORY_PRESENT
1608 def_bool y 1608 def_bool y
1609 depends on X86_32 && DISCONTIGMEM 1609 depends on X86_32 && DISCONTIGMEM
1610 1610
1611config NEED_NODE_MEMMAP_SIZE
1612 def_bool y
1613 depends on X86_32 && (DISCONTIGMEM || SPARSEMEM)
1614
1615config ARCH_FLATMEM_ENABLE 1611config ARCH_FLATMEM_ENABLE
1616 def_bool y 1612 def_bool y
1617 depends on X86_32 && !NUMA 1613 depends on X86_32 && !NUMA
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index aca6295350f3..e8a4a09e20f1 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -60,17 +60,6 @@ void memory_present(int nid, unsigned long start, unsigned long end)
60 } 60 }
61 printk(KERN_CONT "\n"); 61 printk(KERN_CONT "\n");
62} 62}
63
64unsigned 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}
74#endif 63#endif
75 64
76extern unsigned long highend_pfn, highstart_pfn; 65extern unsigned long highend_pfn, highstart_pfn;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 7522a6987595..a2db4576e499 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -816,10 +816,6 @@ int local_memory_node(int node_id);
816static inline int local_memory_node(int node_id) { return node_id; }; 816static inline int local_memory_node(int node_id) { return node_id; };
817#endif 817#endif
818 818
819#ifdef CONFIG_NEED_NODE_MEMMAP_SIZE
820unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
821#endif
822
823/* 819/*
824 * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc. 820 * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
825 */ 821 */
@@ -1289,7 +1285,6 @@ struct mminit_pfnnid_cache {
1289#endif 1285#endif
1290 1286
1291void memory_present(int nid, unsigned long start, unsigned long end); 1287void memory_present(int nid, unsigned long start, unsigned long end);
1292unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
1293 1288
1294/* 1289/*
1295 * If it is possible to have holes within a MAX_ORDER_NR_PAGES, then we 1290 * If it is possible to have holes within a MAX_ORDER_NR_PAGES, then we
diff --git a/mm/sparse.c b/mm/sparse.c
index 7af5e7a92528..79b26f98d793 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -236,28 +236,6 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
236} 236}
237 237
238/* 238/*
239 * Only used by the i386 NUMA architecures, but relatively
240 * generic code.
241 */
242unsigned 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
260/*
261 * Subtle, we encode the real pfn into the mem_map such that 239 * Subtle, we encode the real pfn into the mem_map such that
262 * the identity pfn - section_mem_map will return the actual 240 * the identity pfn - section_mem_map will return the actual
263 * physical page frame number. 241 * physical page frame number.