alpha 2.4.11-pre3: delay disabling early boot messages
Quoted 1 line
From Jay Estabrook:
Alpha has this nice way to output console messages via SRM callbacks which we can enable immediately on bootup, and so get debugging output before console_init. This patch delays when we turn that off, and so narrows the window in which we can't get debug output.
r~
arch/alpha/kernel/irq_alpha.c +0 -5
@@ -108,11 +108,6 @@ init_IRQ(void)wrent (entInt,0 ); alpha_mv.init_irq (); - -/* If we had wanted SRM console printk echoing early, undo it now. */ -if (alpha_using_srm && srmcons_output) { -unregister_srm_console (); - } }/*
arch/alpha/kernel/setup.c +14 -6
@@ -63,12 +63,20 @@ unsigned long srm_hae;/* Which processor we booted from. */ int boot_cpuid; -/* Using SRM callbacks for initial console output. This works from -setup_arch() time through the end of init_IRQ(), as those places -are under our control. - -By default, OFF; set it with a bootcommand arg of "srmcons". -*/ +/* +* Using SRM callbacks for initial console output. This works from +* setup_arch() time through the end of time_init(), as those places +* are under our (Alpha) control. + +* "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... ;-} +* +* By default, OFF; set it with a bootcommand arg of "srmcons". +*/ int srmcons_output =0 ;/* Enforce a memory size limit; useful for testing. By default, none. */
arch/alpha/kernel/time.c +15 -0
@@ -332,6 +333,21 @@ time_init(void) alpha_mv.init_rtc (); do_get_fast_time = do_gettimeofday; + +/* +* 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 ; + } }/*
Quoted 4 lines · [email protected] said:
Alpha has this nice way to output console messages via SRM callbacks which we can enable immediately on bootup, and so get debugging output before
console_init. This patch delays when we turn that off, and so narrows the window in which we can't get debug output.
Putting it in time_init() because we happen to know that time_init() is the last thing called from init/main.c before console_init() is a bit of a hack :)
I've wanted this on other platforms too - couldn't we add an unregister_boot_console() to console_init() instead?
--
dwmw2
Quoted 2 lines · David Woodhouse
I've wanted this on other platforms too - couldn't we add an
unregister_boot_console()toconsole_init()instead?
Seems reasonable. I wouldn't want to touch such a think in 2.4 though.
r~