Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752914AbbDGLb3 (ORCPT ); Tue, 7 Apr 2015 07:31:29 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:36138 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbbDGLb0 (ORCPT ); Tue, 7 Apr 2015 07:31:26 -0400 From: Alexander Kuleshov To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH 2/2 v2] x86/earlyprintk: setup earlyprintk as possible Date: Tue, 7 Apr 2015 17:31:07 +0600 Message-Id: <1428406267-24349-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.3.3.611.g09038fc.dirty In-Reply-To: <1428404540-16601-1-git-send-email-kuleshovmail@gmail.com> References: <1428404540-16601-1-git-send-email-kuleshovmail@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1687 Lines: 45 As setup_earlyprintk passed to the early_param, it will be usable only after 'parse_early_param' function will be called from the 'setup_arch'. So we have earlyprintk during early boot and decompression. Next point after decompression of the kernel where we can use early_printk is after call of the 'parse_early_param'. This patch removes 'earlyprintk' from the early_param and setup it right after boot data copying. So 'early_printk' function will be usabable after decompression of kernel and before parse_early_param will be called. Kernel with this patch was tested with qemu-i386. early_printk function works after early_printk initialization. This patch also tested and works with enabled CONFIG_CMDLINE_BOOL and CONFIG_CMDLINE_OVERRIDE. Changes v1->v2: * Call of the setup_early_printk moved to the top of the i386_start_kernel Signed-off-by: Alexander Kuleshov --- arch/x86/kernel/head32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index 2911ef3..cd8527c 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c @@ -31,6 +31,9 @@ static void __init i386_default_early_setup(void) asmlinkage __visible void __init i386_start_kernel(void) { + /* setup earlyprintk as early as possible */ + setup_early_printk(boot_command_line); + cr4_init_shadow(); sanitize_boot_params(&boot_params); -- 2.3.3.611.g09038fc.dirty -- 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/