From: Borislav Petkov <bp@suse.de>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rustad <mark.d.rustad@intel.com>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH v8 0/3] x86/earlyprintk: setup serial earlyprintk as early as possible
Date: Fri, 29 May 2015 18:55:36 +0200 [thread overview]
Message-ID: <20150529165536.GD31469@pd.tnic> (raw)
In-Reply-To: <CANCZXo5VGoHR2RC3LN7+2MA_rrmr67Kz4_8km2oF__QJ54NLqQ@mail.gmail.com>
On Thu, May 28, 2015 at 02:01:12PM +0600, Alexander Kuleshov wrote:
> 2015-05-27 18:51 GMT+06:00 Borislav Petkov <bp@suse.de>:
> > Now, have you tested this on real hardware? Because your 0/n message
> > said "qemu" but I don't think that's sufficient. If we're going to
> > enable early_printk this early, we'd need it working on real hardware
> > too.
> >
> > For that I'd suggest adding a 4th, test patch which issues a couple of
> > numbered early_printk() lines which we could run on a bunch of machines
> > to see whether it actually works.
>
> Thank you for suggestions. But how to do it? The patch already contains:
>
> if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
> early_printk("Early printk is initialized\n");
You can boot with "ignore_loglevel" to see that message. Provided
ignore_loglevel is even parsed that early.
> But I've just noticesed that it does not print anything, because
> console_loglevel can be CONSOLE_LOGLEVEL_DEBUG
> only after parse_early_params too :) How to better be with it? To remove
> if clause and just leave early_printk or something else?
>
> Or you meant something else about patch for testing?
Yes, I meant a testing patch which is used only for testing and which
issues a bunch of early_printk() calls.
But, before you do that, your patchset has more problems. Booting in
qemu+kvm gives this:
early console in setup code
early console in decompress_kernel
Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[ 0.000000] bootconsole [earlyser0] enabled
[ 0.000000] ERROR: earlyprintk= earlyser already used
^^^^^^
[ 0.000000] Linux version 4.1.0-rc5+ (boris@pd) (gcc version 4.9.2 (Debian 4.9.2-10) ) #3 SMP PREEMPT Fri May 29 18:41:59 CEST 2015
[ 0.000000] Command line: root=/dev/sda1 debug ignore_loglevel log_buf_len=16M earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0
...
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] bootconsole [earlyser0] disabled
[ 0.000000] bootconsole [earlyser0] enabled
[ 0.000000] ERROR: earlyprintk= earlyser already used
...
[ 0.000000] per task-struct memory footprint: 2688 bytes
[ 0.000000] WARNING: lockdep init error! lock-(console_sem).lock was acquiredbefore lockdep_init
[ 0.000000] Call stack leading to lockdep invocation was:
[ 0.000000] [<ffffffff81013f0f>] save_stack_trace+0x2f/0x50
[ 0.000000] [<ffffffff810a364c>] __lock_acquire+0xa2c/0xf00
[ 0.000000] [<ffffffff810a440b>] lock_acquire+0xdb/0x2b0
[ 0.000000] [<ffffffff81676b33>] _raw_spin_lock_irqsave+0x53/0x90
[ 0.000000] [<ffffffff8109b146>] down+0x16/0x50
[ 0.000000] [<ffffffff810b4d49>] console_lock+0x19/0x60
[ 0.000000] [<ffffffff810b78e6>] register_console+0x116/0x350
[ 0.000000] [<ffffffff81c36162>] setup_early_printk+0x165/0x467
[ 0.000000] [<ffffffff81c364ba>] setup_early_serial_console+0x56/0x58
[ 0.000000] [<ffffffff81c24565>] x86_64_start_kernel+0xce/0x110
[ 0.000000] [<ffffffffffffffff>] 0xffffffffffffffff
[ 0.000000] ------------------------
This last one shows that you'd need to look into lockdep first. It also
shows that early boot order is pretty fragile so one has to be very
careful when changing stuff there.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
next prev parent reply other threads:[~2015-05-29 16:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 13:06 [PATCH v8 0/3] x86/earlyprintk: setup serial earlyprintk as early as possible Alexander Kuleshov
2015-05-26 13:07 ` [PATCH v8 1/3] x86/setup: introduce setup_bultin_cmdline Alexander Kuleshov
2015-05-26 13:07 ` [PATCH v8 2/3] x86/setup: handle builtin command line as early as possible Alexander Kuleshov
2015-05-26 13:08 ` [PATCH v8 3/3] x86/earlyprintk: setup earlyprintk " Alexander Kuleshov
2015-05-26 13:17 ` [PATCH v8 0/3] x86/earlyprintk: setup serial " Borislav Petkov
2015-05-26 13:20 ` Alexander Kuleshov
2015-05-26 13:57 ` Borislav Petkov
2015-05-26 14:11 ` Alexander Kuleshov
2015-05-26 14:58 ` Andy Shevchenko
2015-05-26 21:34 ` Borislav Petkov
2015-05-27 7:33 ` Alexander Kuleshov
2015-05-27 12:01 ` Borislav Petkov
2015-05-27 12:12 ` Alexander Kuleshov
2015-05-27 12:51 ` Borislav Petkov
2015-05-28 8:01 ` Alexander Kuleshov
2015-05-29 16:55 ` Borislav Petkov [this message]
2015-06-02 11:25 ` Alexander Kuleshov
-- strict thread matches above, loose matches on Subject: below --
2015-05-18 9:19 [PATCH v7 " Alexander Kuleshov
2015-05-26 13:04 ` [PATCH v8 " Alexander Kuleshov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150529165536.GD31469@pd.tnic \
--to=bp@suse.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox