From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qe0-f44.google.com (mail-qe0-f44.google.com [209.85.128.44]) by kanga.kvack.org (Postfix) with ESMTP id 389ED6B0081 for ; Mon, 2 Dec 2013 21:28:56 -0500 (EST) Received: by mail-qe0-f44.google.com with SMTP id nd7so13835810qeb.3 for ; Mon, 02 Dec 2013 18:28:56 -0800 (PST) Received: from devils.ext.ti.com (devils.ext.ti.com. [198.47.26.153]) by mx.google.com with ESMTPS id m8si25284958qcs.45.2013.12.02.18.28.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 18:28:55 -0800 (PST) From: Santosh Shilimkar Subject: [PATCH v2 10/23] mm/printk: Use memblock apis for early memory allocations Date: Mon, 2 Dec 2013 21:27:25 -0500 Message-ID: <1386037658-3161-11-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 , 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 Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar --- kernel/printk/printk.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index be7c86b..d8147f91 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -757,14 +757,10 @@ void __init setup_log_buf(int early) return; if (early) { - unsigned long mem; - - mem = memblock_alloc(new_log_buf_len, PAGE_SIZE); - if (!mem) - return; - new_log_buf = __va(mem); + new_log_buf = + memblock_virt_alloc_align(new_log_buf_len, PAGE_SIZE); } else { - new_log_buf = alloc_bootmem_nopanic(new_log_buf_len); + new_log_buf = memblock_virt_alloc_nopanic(new_log_buf_len); } if (unlikely(!new_log_buf)) { -- 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