Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450AbbEKKYR (ORCPT ); Mon, 11 May 2015 06:24:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38197 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068AbbEKKYQ (ORCPT ); Mon, 11 May 2015 06:24:16 -0400 Date: Mon, 11 May 2015 12:24:10 +0200 From: Borislav Petkov To: Alexander Kuleshov Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Shevchenko , LKML , Greg Kroah-Hartman , Mark Rustad , Yinghai Lu Subject: Re: [PATCH v5 2/2] x86/earlyprintk: setup earlyprintk as early as possible Message-ID: <20150511102409.GC15278@pd.tnic> References: <1431338914-24245-1-git-send-email-kuleshovmail@gmail.com> <1431338958-25864-1-git-send-email-kuleshovmail@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1431338958-25864-1-git-send-email-kuleshovmail@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2503 Lines: 64 On Mon, May 11, 2015 at 04:09:18PM +0600, Alexander Kuleshov wrote: > The early_printk function is usable after setup_early_printk will be executed. We > pass 'earlyprintk' through the kernel command line. It means that earlyprintk > will be usable only after the 'parse_early_param' will be executed. So we have > usable earlyprintk only during early boot, kernel decompression and after call > of the 'parse_early_param'. > > This patch makes setup_early_printk visible for head{32,64}.c So 'early_printk' > function will be usabable after decompression of the kernel and before > parse_early_param will be called. It also safe if CONFIG_CMDLINE_BOOL > and CONFIG_CMDLINE_OVERRIDE are set, because setup_cmdline function will be > called before the setup_early_printk. > > Tested it with qemu, so early_printk() is usable and prints to serial console > right after setup_early_printk function called from arch/x86/kerne/head64.c > > Signed-off-by: Alexander Kuleshov > --- > arch/x86/include/asm/serial.h | 2 ++ > arch/x86/kernel/early_printk.c | 25 +++++++++++++++++++++++++ > arch/x86/kernel/head32.c | 5 +++++ > arch/x86/kernel/head64.c | 8 +++++++- > 4 files changed, 39 insertions(+), 1 deletion(-) Also, when you send the patches, send them to yourself first and try applying them. This way you can check whether your sending path doesn't mangle them for some reason. And ditto: ERROR: code indent should use tabs where possible #91: FILE: arch/x86/kernel/head32.c:35: + setup_early_serial_console();$ WARNING: please, no spaces at the start of a line #91: FILE: arch/x86/kernel/head32.c:35: + setup_early_serial_console();$ ERROR: code indent should use tabs where possible #94: FILE: arch/x86/kernel/head32.c:38: + early_printk("Kernel alive\n");$ WARNING: please, no spaces at the start of a line #94: FILE: arch/x86/kernel/head32.c:38: + early_printk("Kernel alive\n");$ total: 2 errors, 3 warnings, 66 lines checked NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile Your patch has style problems, please review. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/