From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) by kanga.kvack.org (Postfix) with ESMTP id 39BC76B0099 for ; Mon, 2 Dec 2013 21:29:13 -0500 (EST) Received: by mail-yh0-f43.google.com with SMTP id a41so9055101yho.2 for ; Mon, 02 Dec 2013 18:29:13 -0800 (PST) Received: from devils.ext.ti.com (devils.ext.ti.com. [198.47.26.153]) by mx.google.com with ESMTPS id v1si48851846yhg.251.2013.12.02.18.29.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 18:29:12 -0800 (PST) From: Santosh Shilimkar Subject: [PATCH v2 23/23] mm/ARM: OMAP: Use memblock apis for early memory allocations Date: Mon, 2 Dec 2013 21:27:38 -0500 Message-ID: <1386037658-3161-24-git-send-email-santosh.shilimkar@ti.com> In-Reply-To: <1386037658-3161-1-git-send-email-santosh.shilimkar@ti.com> References: <1386037658-3161-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-arm-kernel@lists.infradead.org, linux-mm@kvack.org, Santosh Shilimkar , Yinghai Lu , Tejun Heo , Andrew Morton , Paul Walmsley , Tony Lindgren 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: Paul Walmsley Cc: Tony Lindgren Signed-off-by: Santosh Shilimkar --- arch/arm/mach-omap2/omap_hwmod.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e3f0eca..92d11e2 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2695,9 +2695,7 @@ static int __init _alloc_links(struct omap_hwmod_link **ml, sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF; *sl = NULL; - *ml = alloc_bootmem(sz); - - memset(*ml, 0, sz); + *ml = memblock_virt_alloc(sz); *sl = (void *)(*ml) + sizeof(struct omap_hwmod_link); @@ -2816,9 +2814,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n", __func__, sz, max_ls); - linkspace = alloc_bootmem(sz); - - memset(linkspace, 0, sz); + linkspace = memblock_virt_alloc(sz); return 0; } -- 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