lkml.org 
[lkml]   [2017]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 17/17] RISC-V: Build Infastructure
Date
Palmer Dabbelt <palmer@dabbelt.com> writes:

> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> new file mode 100644
> index 000000000000..366f5f2cf106
> --- /dev/null
> +++ b/arch/riscv/Kconfig
> @@ -0,0 +1,294 @@
...
> +
> +config EARLY_PRINTK
> + bool "Early printk"
> + default n
> + help
> + This option enables special console drivers which allow the kernel
> + to print messages very early in the bootup process.
> +
> + This is useful for kernel debugging when your machine crashes very
> + early before the console code is initialized. For normal operation
> + it is not recommended because it looks ugly and doesn't cooperate
> + with klogd/syslogd or the X server. You should normally N here,
> + unless you want to debug such a crash.

Looks like you copied this text from x86? I think the comment about it
being ugly refers to the VGA early console which you don't have, so
that's not really accurate.

And the part about it not cooperating with klogs/syslogd is true, early
printk output doesn't go to syslog. But if you turn EARLY_PRINTK off
then early printk output goes nowhere at all:

#ifdef CONFIG_EARLY_PRINTK
extern asmlinkage __printf(1, 2)
void early_printk(const char *fmt, ...);
#else
static inline __printf(1, 2) __cold
void early_printk(const char *s, ...) { }
#endif


So if you have a functional early console (which I think you do) then
you might be better off just making this def_bool y.

cheers

\
 
 \ /
  Last update: 2017-07-11 08:31    [W:0.801 / U:2.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site