Commit 8d2d33c0 authored by Jeff Wiedemeier's avatar Jeff Wiedemeier Committed by Richard Henderson

[PATCH] use CONFIG_EARLY_PRINTK to turn off "srmcons" prints

Use CONFIG_EARLY_PRINTK to trigger disable_early_printk() call in
console_init (tty_io.c) to turn off "srmcons" prints rather than the
existing code in time.c.

/jeff
parent 4cdc7fe8
......@@ -458,6 +458,11 @@ config ALPHA_SRM
If unsure, say N.
config EARLY_PRINTK
bool
depends on ALPHA_GENERIC || ALPHA_SRM
default y
config ALPHA_EISA
bool
depends on ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_RAWHIDE
......
......@@ -108,7 +108,6 @@ extern unsigned long wildfire_node_mem_size(int);
/* setup.c */
extern unsigned long srm_hae;
extern int boot_cpuid;
extern int srmcons_output;
/* srmcons.c */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
......
......@@ -77,10 +77,11 @@ int boot_cpuid;
* "srmcons" specified in the boot command arguments allows us to
* see kernel messages during the period of time before the true
* console device is "registered" during console_init(). As of this
* version (2.4.10), time_init() is the last Alpha-specific code
* called before console_init(), so we put "unregister" code
* there to prevent schizophrenic console behavior later... ;-}
* console device is "registered" during console_init().
* As of this version (2.5.59), console_init() will call
* disable_early_printk() as the last action before initializing
* the console drivers. That's the last possible time srmcons can be
* unregistered without interfering with console behavior.
*
* By default, OFF; set it with a bootcommand arg of "srmcons" or
* "console=srm". The meaning of these two args is:
......@@ -659,6 +660,15 @@ setup_arch(char **cmdline_p)
paging_init();
}
void __init
disable_early_printk(void)
{
if (alpha_using_srm && srmcons_output) {
unregister_srm_console();
srmcons_output = 0;
}
}
static char sys_unknown[] = "Unknown";
static char systype_names[][16] = {
"0",
......
......@@ -383,21 +383,6 @@ time_init(void)
/* Startup the timer source. */
alpha_mv.init_rtc();
/*
* If we had wanted SRM console printk echoing early, undo it now.
*
* "srmcons" specified in the boot command arguments allows us to
* see kernel messages during the period of time before the true
* console device is "registered" during console_init(). As of this
* version (2.4.10), time_init() is the last Alpha-specific code
* called before console_init(), so we put this "unregister" code
* here to prevent schizophrenic console behavior later... ;-}
*/
if (alpha_using_srm && srmcons_output) {
unregister_srm_console();
srmcons_output = 0;
}
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment