Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932950Ab3DMPmD (ORCPT ); Sat, 13 Apr 2013 11:42:03 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:49916 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932156Ab3DMPl6 (ORCPT ); Sat, 13 Apr 2013 11:41:58 -0400 From: Jiang Liu To: Andrew Morton , Yinghai Lu Cc: Jiang Liu , David Rientjes , Wen Congyang , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , David Howells , Mark Salter , Jianguo Wu , linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mundt , Tang Chen , linux-sh@vger.kernel.org Subject: [RFC PATCH v1 10/19] mm/SH: prepare for killing free_all_bootmem_node() Date: Sat, 13 Apr 2013 23:36:30 +0800 Message-Id: <1365867399-21323-11-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365867399-21323-1-git-send-email-jiang.liu@huawei.com> References: <1365867399-21323-1-git-send-email-jiang.liu@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1445 Lines: 49 Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu Cc: Paul Mundt Cc: Wen Congyang Cc: Tang Chen Cc: linux-sh@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/sh/mm/init.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 3826596..485c858 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -412,19 +412,11 @@ void __init mem_init(void) iommu_init(); high_memory = NULL; + for_each_online_pgdat(pgdat) + high_memory = max_t(void *, high_memory, + (void *)__va(pgdat_end_pfn(pgdat) << PAGE_SHIFT)); - for_each_online_pgdat(pgdat) { - void *node_high_memory; - - if (pgdat->node_spanned_pages) - free_all_bootmem_node(pgdat); - - node_high_memory = (void *)__va((pgdat->node_start_pfn + - pgdat->node_spanned_pages) << - PAGE_SHIFT); - if (node_high_memory > high_memory) - high_memory = node_high_memory; - } + free_all_bootmem(); /* Set this up early, so we can take care of the zero page */ cpu_cache_init(); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/