All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2 v2] x86_64/earlyprintk: setup earlyprintk as early as possible
Date: Tue, 7 Apr 2015 13:09:31 +0200	[thread overview]
Message-ID: <20150407110931.GC14136@gmail.com> (raw)
In-Reply-To: <1428404540-16601-1-git-send-email-kuleshovmail@gmail.com>


* Alexander Kuleshov <kuleshovmail@gmail.com> wrote:

> As setup_early_printk 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 the kernel and before parse_early_param will be called.
> 
> 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
> 
> Changes v1->v2:
> 
> * Comment added before the setup_early_printk call;
> * Added information about testing to the commit message.
> 
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  arch/x86/kernel/early_printk.c | 4 +---
>  arch/x86/kernel/head64.c       | 3 +++
>  include/linux/printk.h         | 1 +
>  3 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index a62536a..4b0577b 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -329,7 +329,7 @@ static inline void early_console_register(struct console *con, int keep_early)
>  	register_console(early_console);
>  }
>  
> -static int __init setup_early_printk(char *buf)
> +int __init setup_early_printk(char *buf)
>  {
>  	int keep;
>  
> @@ -390,5 +390,3 @@ static int __init setup_early_printk(char *buf)
>  	}
>  	return 0;
>  }
> -
> -early_param("earlyprintk", setup_early_printk);
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index c4f8d46..4034ea6 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -172,6 +172,9 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
>  
>  	copy_bootdata(__va(real_mode_data));
>  
> +	/* setup earlyprintk as early as possible */
> +	setup_early_printk(boot_command_line);
> +

So does this work with CONFIG_CMDLINE_BOOL + CONFIG_CMDLINE_OVERRIDE?

Thanks,

	Ingo

  parent reply	other threads:[~2015-04-07 11:09 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 as possible 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 ` Ingo Molnar [this message]
2015-04-07 11:24   ` [PATCH 1/2 v2] x86_64/earlyprintk: setup earlyprintk as early " 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 ` [PATCH 2/2 v2] x86/earlyprintk: setup earlyprintk " 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=20150407110931.GC14136@gmail.com \
    --to=mingo@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kuleshovmail@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.