[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369838692-26860-5-git-send-email-jiang.liu@huawei.com>
Date: Wed, 29 May 2013 22:44:43 +0800
From: Jiang Liu <liuj97@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jiang Liu <jiang.liu@...wei.com>,
David Rientjes <rientjes@...gle.com>,
Wen Congyang <wency@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>, Minchan Kim <minchan@...nel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Michal Hocko <mhocko@...e.cz>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
David Howells <dhowells@...hat.com>,
Mark Salter <msalter@...hat.com>,
Jianguo Wu <wujianguo@...wei.com>, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
Hirokazu Takata <takata@...ux-m32r.org>,
linux-m32r@...linux-m32r.org, linux-m32r-ja@...linux-m32r.org
Subject: [PATCH, v2 04/13] mm/m32r: prepare for killing free_all_bootmem_node()
Prepare for killing free_all_bootmem_node() by using
free_all_bootmem().
Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
Cc: Hirokazu Takata <takata@...ux-m32r.org>
Cc: linux-m32r@...linux-m32r.org
Cc: linux-m32r-ja@...linux-m32r.org
Cc: linux-kernel@...r.kernel.org
---
arch/m32r/mm/init.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
index a4f8d93..0d4146f 100644
--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -111,28 +111,19 @@ void __init paging_init(void)
*======================================================================*/
void __init mem_init(void)
{
- int nid;
#ifndef CONFIG_MMU
extern unsigned long memory_end;
-#endif
-#ifndef CONFIG_DISCONTIGMEM
- max_mapnr = get_num_physpages();
-#endif /* CONFIG_DISCONTIGMEM */
-
-#ifdef CONFIG_MMU
- high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
-#else
high_memory = (void *)(memory_end & PAGE_MASK);
+#else
+ high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
#endif /* CONFIG_MMU */
/* clear the zero-page */
memset(empty_zero_page, 0, PAGE_SIZE);
- /* this will put all low memory onto the freelists */
- for_each_online_node(nid)
- free_all_bootmem_node(NODE_DATA(nid));
-
+ set_max_mapnr(get_num_physpages());
+ free_all_bootmem();
mem_init_print_info(NULL);
}
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists