Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753933AbbFISFF (ORCPT ); Tue, 9 Jun 2015 14:05:05 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:36238 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbbFISEx (ORCPT ); Tue, 9 Jun 2015 14:04:53 -0400 MIME-Version: 1.0 In-Reply-To: <20150609160727.GG22105@pd.tnic> References: <1433848247-3550-1-git-send-email-kuleshovmail@gmail.com> <1433848293-5228-1-git-send-email-kuleshovmail@gmail.com> <1433865532.26331.108.camel@linux.intel.com> <20150609160727.GG22105@pd.tnic> Date: Tue, 9 Jun 2015 23:37:27 +0600 Message-ID: Subject: Re: [PATCH v11 3/5] x86/earlyprintk: Allocate early log_buf as early as possible From: Alexander Kuleshov To: Borislav Petkov Cc: Andy Shevchenko , Andrew Morton , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , LKML , Greg Kroah-Hartman , Mark Rustad , Yinghai Lu Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1658 Lines: 46 On Tue, Jun 09, 2015 at 06:58:52PM +0300, Andy Shevchenko wrote: >> On Tue, 2015-06-09 at 17:11 +0600, Alexander Kuleshov wrote: >> > This patch moves call of the early setup_log_buf from the >> > arch/x86/kernel/setup.c to the arch/x86/kernel/head{32,64}.c >> > and updates log_buf with the earlyprintk messages. >> > >> >> Didn't mention lockdep_init() change. Regarding to what Borislav told >> you how do you handle double call of lockdep_init()? >> Double call of the lockdep_init is safe, since it has if (lockdep_initialized) return; at the beginning. Will update commit message with it. >> Also, when you print the same message to the serial and to kernel >> buffer, do you avoid duplication? Your early_printk messages needs flag >> LOG_NOCONS if I understand correctly. Yes, just checked. They will be duplicated. Thanks for advice about LOG_NOCONS. Borislav, I'm really not sure too, that using of printk to update log_buf with the earlyprintk is a right correct here. So, we can update log_buf with earlyprintk messages with the call of the log_store(0, LOGLEVEL_DEFAULT, LOG_NOCONS|LOG_CONT, 0, NULL, 0, buf, strlen(buf)); in the early_printk function. What do you think about it? Do we need to see earlyprintk messages in the dmesg output? Maybe there need to create yet another option, something like: CONFIG_EARLY_PRINTK_KERNEL_LOG or something like this? -- 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/