Skip to content

Commit

Permalink
[POWERPC] Early debug forces console log level to max
Browse files Browse the repository at this point in the history
This makes the early debug option force the console loglevel
to the max.  The early debug option is meant to catch messages very
early in the kernel boot process, in many cases, before the kernel
has a chance to parse the "debug" command line argument.  Thus it
makes sense when CONFIG_PPC_EARLY_DEBUG is set, to force the console
log level to the max at boot time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 11, 2007
1 parent 837c54d commit 7ee1746
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ config BOOTX_TEXT

config PPC_EARLY_DEBUG
bool "Early debugging (dangerous)"
help
Say Y to enable some early debugging facilities that may be available
for your processor/board combination. Those facilities are hacks
intended to debug problems early during boot, this should not be
enabled in a production kernel.
Note that enabling this will also cause the kernel default log level
to be pushed to max automatically very early during boot

choice
prompt "Early debugging console"
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/udbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ void __init udbg_early_init(void)
#elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
udbg_init_cpm();
#endif

#ifdef CONFIG_PPC_EARLY_DEBUG
console_loglevel = 10;
#endif
}

/* udbg library, used by xmon et al */
Expand Down

0 comments on commit 7ee1746

Please sign in to comment.