From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH 2/2 v2] x86/earlyprintk: setup earlyprintk as possible
Date: Tue, 7 Apr 2015 17:31:07 +0600 [thread overview]
Message-ID: <1428406267-24349-1-git-send-email-kuleshovmail@gmail.com> (raw)
In-Reply-To: <1428404540-16601-1-git-send-email-kuleshovmail@gmail.com>
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 <kuleshovmail@gmail.com>
---
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
prev parent reply other threads:[~2015-04-07 11:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 11:02 [PATCH 1/2 v2] x86_64/earlyprintk: setup earlyprintk as early " Alexander Kuleshov
2015-04-07 11:02 ` [PATCH 2/2] x86/earlyprintk: setup earlyprintk " Alexander Kuleshov
2015-04-07 11:07 ` Ingo Molnar
2015-04-07 11:09 ` [PATCH 1/2 v2] x86_64/earlyprintk: setup earlyprintk as early " Ingo Molnar
2015-04-07 11:24 ` Alexander Kuleshov
2015-04-07 11:35 ` Ingo Molnar
2015-04-07 11:47 ` Alexander Kuleshov
2015-04-07 14:03 ` Ingo Molnar
2015-04-07 16:49 ` Alexander Kuleshov
2015-04-07 17:00 ` Alexander Kuleshov
2015-04-07 17:30 ` Alexander Kuleshov
2015-04-07 11:31 ` Alexander Kuleshov [this message]
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=1428406267-24349-1-git-send-email-kuleshovmail@gmail.com \
--to=kuleshovmail@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®