]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mm: remove obsolete alloc_remap()
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 Mar 2018 22:14:56 +0000 (23:14 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 16 Mar 2018 09:56:13 +0000 (10:56 +0100)
Tile was the only remaining architecture to implement alloc_remap(),
and since that is being removed, there is no point in keeping this
function.

Removing all callers simplifies the mem_map handling.

Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/linux/bootmem.h
mm/page_alloc.c
mm/sparse.c

index a53063e9d7d83b23c9d42dc954f6ea81339e06d5..7942a96b1a9dc393c106ebcadc300285132a5ce1 100644 (file)
@@ -364,15 +364,6 @@ static inline void __init memblock_free_late(
 }
 #endif /* defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) */
 
-#ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP
-extern void *alloc_remap(int nid, unsigned long size);
-#else
-static inline void *alloc_remap(int nid, unsigned long size)
-{
-       return NULL;
-}
-#endif /* CONFIG_HAVE_ARCH_ALLOC_REMAP */
-
 extern void *alloc_large_system_hash(const char *tablename,
                                     unsigned long bucketsize,
                                     unsigned long numentries,
index cb416723538fe49810db0cb9b9e0b165cb963a44..484e21062228a01a723a370eb562be0fb12759e6 100644 (file)
@@ -6199,10 +6199,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat)
                end = pgdat_end_pfn(pgdat);
                end = ALIGN(end, MAX_ORDER_NR_PAGES);
                size =  (end - start) * sizeof(struct page);
-               map = alloc_remap(pgdat->node_id, size);
-               if (!map)
-                       map = memblock_virt_alloc_node_nopanic(size,
-                                                              pgdat->node_id);
+               map = memblock_virt_alloc_node_nopanic(size, pgdat->node_id);
                pgdat->node_mem_map = map + offset;
        }
        pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n",
index 7af5e7a92528b4edf622a388faf3e39672144801..65bb52599f90bfebce226b07dafc5fee30560ca8 100644 (file)
@@ -427,10 +427,6 @@ struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid,
        struct page *map;
        unsigned long size;
 
-       map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION);
-       if (map)
-               return map;
-
        size = PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION);
        map = memblock_virt_alloc_try_nid(size,
                                          PAGE_SIZE, __pa(MAX_DMA_ADDRESS),
@@ -446,17 +442,6 @@ void __init sparse_mem_maps_populate_node(struct page **map_map,
        unsigned long pnum;
        unsigned long size = sizeof(struct page) * PAGES_PER_SECTION;
 
-       map = alloc_remap(nodeid, size * map_count);
-       if (map) {
-               for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
-                       if (!present_section_nr(pnum))
-                               continue;
-                       map_map[pnum] = map;
-                       map += size;
-               }
-               return;
-       }
-
        size = PAGE_ALIGN(size);
        map = memblock_virt_alloc_try_nid_raw(size * map_count,
                                              PAGE_SIZE, __pa(MAX_DMA_ADDRESS),