From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by kanga.kvack.org (Postfix) with ESMTP id C547F6B0111 for ; Mon, 9 Dec 2013 16:52:21 -0500 (EST) Received: by mail-qc0-f175.google.com with SMTP id e9so3299709qcy.34 for ; Mon, 09 Dec 2013 13:52:21 -0800 (PST) Received: from comal.ext.ti.com (comal.ext.ti.com. [198.47.26.152]) by mx.google.com with ESMTPS id v3si8729751qat.21.2013.12.09.13.52.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Dec 2013 13:52:20 -0800 (PST) From: Santosh Shilimkar Subject: [PATCH v3 17/23] mm/page_cgroup: Use memblock apis for early memory allocations Date: Mon, 9 Dec 2013 16:50:50 -0500 Message-ID: <1386625856-12942-18-git-send-email-santosh.shilimkar@ti.com> In-Reply-To: <1386625856-12942-1-git-send-email-santosh.shilimkar@ti.com> References: <1386625856-12942-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: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Grygorii Strashko , Yinghai Lu , Tejun Heo , Andrew Morton , Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , 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 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