Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196Ab3JLWAS (ORCPT ); Sat, 12 Oct 2013 18:00:18 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:36958 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499Ab3JLV76 (ORCPT ); Sat, 12 Oct 2013 17:59:58 -0400 From: Santosh Shilimkar To: , CC: , , , , Santosh Shilimkar , Andrew Morton Subject: [RFC 10/23] mm/printk: Use memblock apis for early memory allocations Date: Sat, 12 Oct 2013 17:58:53 -0400 Message-ID: <1381615146-20342-11-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1381615146-20342-1-git-send-email-santosh.shilimkar@ti.com> References: <1381615146-20342-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1255 Lines: 42 Switch to memblock interfaces for early memory allocator 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 b4e8500..8624466 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_early_alloc_pages_nopanic(new_log_buf_len); } else { - new_log_buf = alloc_bootmem_nopanic(new_log_buf_len); + new_log_buf = memblock_early_alloc_nopanic(new_log_buf_len); } if (unlikely(!new_log_buf)) { -- 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/