From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by kanga.kvack.org (Postfix) with ESMTP id 29D776B024E for ; Fri, 8 Nov 2013 18:43:34 -0500 (EST) Received: by mail-pb0-f44.google.com with SMTP id rp16so2763001pbb.17 for ; Fri, 08 Nov 2013 15:43:33 -0800 (PST) Received: from psmtp.com ([74.125.245.163]) by mx.google.com with SMTP id kn3si8074012pbc.214.2013.11.08.15.43.32 for ; Fri, 08 Nov 2013 15:43:32 -0800 (PST) From: Santosh Shilimkar Subject: [PATCH 18/24] mm/page_cgroup: Use memblock apis for early memory allocations Date: Fri, 8 Nov 2013 18:41:54 -0500 Message-ID: <1383954120-24368-19-git-send-email-santosh.shilimkar@ti.com> In-Reply-To: <1383954120-24368-1-git-send-email-santosh.shilimkar@ti.com> References: <1383954120-24368-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: tj@kernel.org, linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Grygorii Strashko , Yinghai Lu , Andrew Morton , Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , cgroups@vger.kernel.org, Santosh Shilimkar From: Grygorii Strashko Switch to memblock interfaces for early memory allocator instead of bootmem allocator. No functional change in beahvior than what it is in current code from bootmem users points of view. Archs already converted to NO_BOOTMEM now directly use memblock interfaces instead of bootmem wrappers build on top of memblock. And the archs which still uses bootmem, these new apis just fallback to exiting bootmem APIs. Cc: Yinghai Lu Cc: Tejun Heo Cc: Andrew Morton Cc: Johannes Weiner Cc: Michal Hocko Cc: KAMEZAWA Hiroyuki Cc: cgroups@vger.kernel.org Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar --- mm/page_cgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 6d757e3a..d8bd2c5 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c @@ -54,8 +54,9 @@ static int __init alloc_node_page_cgroup(int nid) table_size = sizeof(struct page_cgroup) * nr_pages; - base = __alloc_bootmem_node_nopanic(NODE_DATA(nid), - table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); + base = memblock_virt_alloc_try_nid_nopanic( + table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS), + BOOTMEM_ALLOC_ACCESSIBLE, nid); if (!base) return -ENOMEM; NODE_DATA(nid)->node_page_cgroup = base; -- 1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org