From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by kanga.kvack.org (Postfix) with ESMTP id E499D6B0208 for ; Fri, 8 Nov 2013 18:43:22 -0500 (EST) Received: by mail-pd0-f172.google.com with SMTP id w10so2786165pde.31 for ; Fri, 08 Nov 2013 15:43:22 -0800 (PST) Received: from psmtp.com ([74.125.245.139]) by mx.google.com with SMTP id q1si5441920pad.25.2013.11.08.15.43.17 for ; Fri, 08 Nov 2013 15:43:21 -0800 (PST) From: Santosh Shilimkar Subject: [PATCH 10/24] mm/init: Use memblock apis for early memory allocations Date: Fri, 8 Nov 2013 18:41:46 -0500 Message-ID: <1383954120-24368-11-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, Santosh Shilimkar , Yinghai Lu , Andrew Morton 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: Santosh Shilimkar --- init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/main.c b/init/main.c index af310af..1a95ea2 100644 --- a/init/main.c +++ b/init/main.c @@ -346,8 +346,8 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { } */ static void __init setup_command_line(char *command_line) { - saved_command_line = alloc_bootmem(strlen (boot_command_line)+1); - static_command_line = alloc_bootmem(strlen (command_line)+1); + saved_command_line = memblock_virt_alloc(strlen(boot_command_line)+1); + static_command_line = memblock_virt_alloc(strlen(command_line)+1); strcpy (saved_command_line, boot_command_line); strcpy (static_command_line, command_line); } -- 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