OSDN Git Service

x86/mm/32: Remove unused node_memmap_size_bytes() & CONFIG_NEED_NODE_MEMMAP_SIZE...
authorDavid Rientjes <rientjes@google.com>
Tue, 27 Mar 2018 06:27:21 +0000 (23:27 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 27 Mar 2018 06:45:02 +0000 (08:45 +0200)
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: f03574f2d5b2 ("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>
arch/x86/Kconfig
arch/x86/mm/numa_32.c
include/linux/mmzone.h
mm/sparse.c

index 18233e4..739aff2 100644 (file)
@@ -1608,10 +1608,6 @@ config ARCH_HAVE_MEMORY_PRESENT
        def_bool y
        depends on X86_32 && DISCONTIGMEM
 
-config NEED_NODE_MEMMAP_SIZE
-       def_bool y
-       depends on X86_32 && (DISCONTIGMEM || SPARSEMEM)
-
 config ARCH_FLATMEM_ENABLE
        def_bool y
        depends on X86_32 && !NUMA
index aca6295..e8a4a09 100644 (file)
@@ -60,17 +60,6 @@ void memory_present(int nid, unsigned long start, unsigned long end)
        }
        printk(KERN_CONT "\n");
 }
-
-unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn,
-                                             unsigned long end_pfn)
-{
-       unsigned long nr_pages = end_pfn - start_pfn;
-
-       if (!nr_pages)
-               return 0;
-
-       return (nr_pages + 1) * sizeof(struct page);
-}
 #endif
 
 extern unsigned long highend_pfn, highstart_pfn;
index 7522a69..a2db457 100644 (file)
@@ -816,10 +816,6 @@ int local_memory_node(int node_id);
 static inline int local_memory_node(int node_id) { return node_id; };
 #endif
 
-#ifdef CONFIG_NEED_NODE_MEMMAP_SIZE
-unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
-#endif
-
 /*
  * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
  */
@@ -1289,7 +1285,6 @@ struct mminit_pfnnid_cache {
 #endif
 
 void memory_present(int nid, unsigned long start, unsigned long end);
-unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
 
 /*
  * If it is possible to have holes within a MAX_ORDER_NR_PAGES, then we
index 7af5e7a..79b26f9 100644 (file)
@@ -236,28 +236,6 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
 }
 
 /*
- * Only used by the i386 NUMA architecures, but relatively
- * generic code.
- */
-unsigned long __init node_memmap_size_bytes(int nid, unsigned long start_pfn,
-                                                    unsigned long end_pfn)
-{
-       unsigned long pfn;
-       unsigned long nr_pages = 0;
-
-       mminit_validate_memmodel_limits(&start_pfn, &end_pfn);
-       for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
-               if (nid != early_pfn_to_nid(pfn))
-                       continue;
-
-               if (pfn_present(pfn))
-                       nr_pages += PAGES_PER_SECTION;
-       }
-
-       return nr_pages * sizeof(struct page);
-}
-
-/*
  * Subtle, we encode the real pfn into the mem_map such that
  * the identity pfn - section_mem_map will return the actual
  * physical page frame number.