Re: [PATCH 2/2] x86/earlyprintk: setup earlyprintk as early as possible

Alexander Kuleshov
2015-04-09T07:39:16Z

Hello Peter,

2015-04-08 17:32 GMT+06:00 Peter Hurley <peter@hurleysoftware.com>:
>> +
>> +void setup_early_serial_console() {
>
> If you put this function in kernel/early_printk.c, then
> setup_early_printk() can remain file scope.
>

Yes, right. will fix it.

>
> The WARN is still required here because the register_console() caller
> is not always obvious.
>
> A better way to achieve what you want is to not re-register the console
> to begin with. Looking at early_console_register() and setup_early_printk(),
> it seems like re-registration would already be prevented (since early_console
> != 0 after the first call to early_console_register())? Have you tried this?
>

hmm, now, thanks for the point will test it.

Thank you.