Commit c2e0fa9f authored by Jesse Barnes's avatar Jesse Barnes Committed by David Mosberger

[PATCH] ia64: early console registration

Allow consoles to register early if they're capable of early output.
If one of them registers successfully, set CPU 0 online so that
printk() will actually call the console drivers.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent 4e4da02c
...@@ -280,6 +280,29 @@ setup_serial_legacy (void) ...@@ -280,6 +280,29 @@ setup_serial_legacy (void)
} }
#endif #endif
/**
* early_console_setup - setup debugging console
*
* Consoles started here require little enough setup that we can start using
* them very early in the boot process, either right after the machine
* vector initialization, or even before if the drivers can detect their hw.
*
* Returns non-zero if a console couldn't be setup.
*/
static int __init
early_console_setup (void)
{
#ifdef CONFIG_SGI_L1_SERIAL_CONSOLE
{
extern int sn_serial_console_early_setup(void);
if(!sn_serial_console_early_setup())
return 0;
}
#endif
return -1;
}
void __init void __init
setup_arch (char **cmdline_p) setup_arch (char **cmdline_p)
{ {
...@@ -297,6 +320,10 @@ setup_arch (char **cmdline_p) ...@@ -297,6 +320,10 @@ setup_arch (char **cmdline_p)
machvec_init(acpi_get_sysname()); machvec_init(acpi_get_sysname());
#endif #endif
/* If we register an early console, allow CPU 0 to printk */
if (!early_console_setup())
cpu_set(smp_processor_id(), cpu_online_map);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
/* Initialize the ACPI boot-time table parser */ /* Initialize the ACPI boot-time table parser */
acpi_table_init(); acpi_table_init();
......
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