Re: [PATCH v11 5/5] x86/earlyprintk: Patch for testing earlyprintk

From: Andy Shevchenko
Date: Tue Jun 09 2015 - 12:01:29 EST


On Tue, 2015-06-09 at 17:11 +0600, Alexander Kuleshov wrote:
> Signed-off-by: Alexander Kuleshov <kuleshovmail@xxxxxxxxx>

Please, mark those patches as something like "[NOT TO APPLY]".

Or you may (if others have no objections) create a configuration option
like CONFIG_TEST_EARLY_PRINTK and make this patch upstreamable.
See below.

> ---
> arch/x86/kernel/head64.c | 1 +
> arch/x86/kernel/setup.c | 1 +
> init/main.c | 2 +-
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index 041be2c..1d1d167 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -204,5 +204,6 @@ void __init x86_64_start_reservations(char *real_mode_data)
>
> reserve_ebda_region();
>
> + early_printk("Go on the start_kernel\n");

#ifdef CONFIG_TEST_EARLY_PRINTK
early_printk("%s: Starting kernel...\n", __func__);
#endif

> start_kernel();
> }
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index edfdb6a..22e8f39 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -876,6 +876,7 @@ void __init setup_builtin_cmdline(void)
>
> void __init setup_arch(char **cmdline_p)
> {
> + early_printk("Now setup arch is working\n");

#ifdef CONFIG_TEST_EARLY_PRINTK
early_printk("%s: Enter\n", __func__);
#endif

> memblock_reserve(__pa_symbol(_text),
> (unsigned long)__bss_stop - (unsigned long)_text);
>
> diff --git a/init/main.c b/init/main.c
> index 2115055..79087b8 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -493,7 +493,7 @@ asmlinkage __visible void __init start_kernel(void)
> {
> char *command_line;
> char *after_dashes;
> -

This removal is wrong. Leave empty string after definition block.

> + early_printk("start_kernel function started to work\n");

#ifdef CONFIG_TEST_EARLY_PRINTK
early_printk("%s: Enter\n", __func__);
#endif

> /*
> * Need to run as early as possible, to initialize the
> * lockdep hash:


--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/