Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932949AbbFIJT6 (ORCPT ); Tue, 9 Jun 2015 05:19:58 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34335 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753770AbbFIJTk (ORCPT ); Tue, 9 Jun 2015 05:19:40 -0400 MIME-Version: 1.0 In-Reply-To: <20150608093326.GC5877@pd.tnic> References: <1433686424-18555-1-git-send-email-kuleshovmail@gmail.com> <1433686477-20856-1-git-send-email-kuleshovmail@gmail.com> <20150608093326.GC5877@pd.tnic> Date: Tue, 9 Jun 2015 15:19:38 +0600 Message-ID: Subject: Re: [PATCH v10 3/3] x86/earlyprintk: setup earlyprintk as early as possible From: Alexander Kuleshov To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Shevchenko , 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: 3356 Lines: 75 2015-06-08 15:33 GMT+06:00 Borislav Petkov : > On Sun, Jun 07, 2015 at 08:14:37PM +0600, Alexander Kuleshov wrote: >> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c >> index 1e5f064..769d411 100644 >> --- a/arch/x86/kernel/head64.c >> +++ b/arch/x86/kernel/head64.c >> @@ -174,7 +174,12 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data) >> >> setup_builtin_cmdline(); >> >> + lockdep_init(); > > So you've added that lockdep_init() call here and above on the 32-bit > path and haven't removed the one in start_kernel(). > Hello Borislav, Yes, I've left the lockdep_init in the start_kernel because there are a couple architectures (arm,arm64 and etc...) who have support of the lockdep, but have do not call lockdep_init in their architecture-specific code from the arch/*. > * Then, your patches don't apply. Something garbles them insanely so that > not even fuzzy, ignore-context patch --merge works. Please fix your > setup. For that, send your patches to yourself and try applying them. > Send them out only if they apply cleanly. > > And do them against tip/master or latest Linus rc, alternatively. Yes, sorry, will fix it. > * To that patchset: I did the diff below ontop of yours to check whether > that early printk actually works. > > And it doesn't on my test box here. > > The beginning of my dmesg contains: > > [ 0.000000] bootconsole [earlyser0] enabled > [ 0.000000] Initializing cgroup subsys cpuset > [ 0.000000] Initializing cgroup subsys cpu > [ 0.000000] Initializing cgroup subsys cpuacct > [ 0.000000] Linux version 4.1.0-rc6+ (root@gondor) (gcc version 4.9.1 (Debian 4.9.1-19) ) #2 SMP PREEMPT Mon Jun 8 11:10:00 CEST 2015 > [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.1.0-rc6+ root=/dev/sda7 ro earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0 root=/dev/sda7 log_buf_len=10M resume=/dev/sda5 no_console_suspend ignore_loglevel > [ 0.000000] KERNEL supported cpus: > [ 0.000000] Intel GenuineIntel > [ 0.000000] AMD AuthenticAMD > [ 0.000000] Centaur CentaurHauls > [ 0.000000] x86/fpu: xstate_offset[2]: 0240, xstate_sizes[2]: 0100 > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers' > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers' > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers' > [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 0x340 bytes, using 'standard' format. > [ 0.000000] x86/fpu: Using 'eager' FPU context switches. > [ 0.000000] e820: BIOS-provided physical RAM map: > ... > > and I have CONFIG_EARLY_PRINTK=y. So provided I'm not missing anything, > I'd say you'd need to do more staring. > I've tested this and does not see early_printk output too on the hardware, but only with qemu when I setup serial connection... The problem here that the early_printk function does not use the log_buf to store its messages as it printk does. How to be with this? Is early_printk must to store its messages in the log_buf? Thank you. -- 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/