mm/page_alloc: remove unused parameter in init_currently_empty_zone()
authorYaowei Bai <bywxiaobai@163.com>
Fri, 6 Nov 2015 02:47:06 +0000 (18:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
Commit a2f3aa025766 ("[PATCH] Fix sparsemem on Cell") fixed an oops
experienced on the Cell architecture when init-time functions,
early_*(), are called at runtime by introducing an 'enum memmap_context'
parameter to memmap_init_zone() and init_currently_empty_zone().  This
parameter is intended to be used to tell whether the call of these two
functions is being made on behalf of a hotplug event, or happening at
boot-time.  However, init_currently_empty_zone() does not use this
parameter at all, so remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mmzone.h
mm/memory_hotplug.c
mm/page_alloc.c

index d943477372928c13a586cbcd78472a7e29bf65c9..2d7e660cdefe4596f4e99487264ae1bc01078ad9 100644 (file)
@@ -823,8 +823,7 @@ enum memmap_context {
        MEMMAP_HOTPLUG,
 };
 extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
-                                    unsigned long size,
-                                    enum memmap_context context);
+                                    unsigned long size);
 
 extern void lruvec_init(struct lruvec *lruvec);
 
index 0780d118d26e70d5cfc3a3e67ceca4915684a003..67d488ab495e57b9018484932e135078c787903c 100644 (file)
@@ -339,8 +339,8 @@ static int __ref ensure_zone_is_initialized(struct zone *zone,
                        unsigned long start_pfn, unsigned long num_pages)
 {
        if (!zone_is_initialized(zone))
-               return init_currently_empty_zone(zone, start_pfn, num_pages,
-                                                MEMMAP_HOTPLUG);
+               return init_currently_empty_zone(zone, start_pfn, num_pages);
+
        return 0;
 }
 
index 805bbad2e24e1a84b383ebc90fc825527238957a..c60605df9b48e03b79555b23b8b3f0e48d769a3e 100644 (file)
@@ -4900,8 +4900,7 @@ static __meminit void zone_pcp_init(struct zone *zone)
 
 int __meminit init_currently_empty_zone(struct zone *zone,
                                        unsigned long zone_start_pfn,
-                                       unsigned long size,
-                                       enum memmap_context context)
+                                       unsigned long size)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
        int ret;
@@ -5413,8 +5412,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
 
                set_pageblock_order();
                setup_usemap(pgdat, zone, zone_start_pfn, size);
-               ret = init_currently_empty_zone(zone, zone_start_pfn,
-                                               size, MEMMAP_EARLY);
+               ret = init_currently_empty_zone(zone, zone_start_pfn, size);
                BUG_ON(ret);
                memmap_init(size, nid, j, zone_start_pfn);
                zone_start_pfn += size;
This page took 0.037398 seconds and 5 git commands to generate.