The patch titled From: Jeremy Fitzhardinge <jeremy@xxxxxxxx> has been removed from the -mm tree. Its filename was xen-paravirt_ops-some-generic-early-printk-boot-console-fixups.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ Subject: From: Jeremy Fitzhardinge <jeremy@xxxxxxxx> From: Gerd Hoffmann <kraxel@xxxxxxx> Some generic early printk & boot console fixups (already sent to lkml). Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx> --- =================================================================== Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86_64/kernel/early_printk.c | 20 +++++--------------- drivers/char/tty_io.c | 5 ----- kernel/printk.c | 26 ++++++++++++++++---------- 3 files changed, 21 insertions(+), 30 deletions(-) diff -puN arch/x86_64/kernel/early_printk.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups arch/x86_64/kernel/early_printk.c --- a/arch/x86_64/kernel/early_printk.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups +++ a/arch/x86_64/kernel/early_printk.c @@ -244,22 +244,12 @@ static int __init setup_early_printk(cha early_console = &simnow_console; keep_early = 1; } + + if (keep_early) + early_console->flags &= ~CON_BOOT; + else + early_console->flags |= CON_BOOT; register_console(early_console); return 0; } - early_param("earlyprintk", setup_early_printk); - -void __init disable_early_printk(void) -{ - if (!early_console_initialized || !early_console) - return; - if (!keep_early) { - printk("disabling early console\n"); - unregister_console(early_console); - early_console_initialized = 0; - } else { - printk("keeping early console\n"); - } -} - diff -puN drivers/char/tty_io.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups drivers/char/tty_io.c --- a/drivers/char/tty_io.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups +++ a/drivers/char/tty_io.c @@ -141,8 +141,6 @@ static DECLARE_MUTEX(allocated_ptys_lock static int ptmx_open(struct inode *, struct file *); #endif -extern void disable_early_printk(void); - static void initialize_tty_struct(struct tty_struct *tty); static ssize_t tty_read(struct file *, char __user *, size_t, loff_t *); @@ -3879,9 +3877,6 @@ void __init console_init(void) * set up the console device so that later boot sequences can * inform about problems etc.. */ -#ifdef CONFIG_EARLY_PRINTK - disable_early_printk(); -#endif call = __con_initcall_start; while (call < __con_initcall_end) { (*call)(); diff -puN kernel/printk.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups kernel/printk.c --- a/kernel/printk.c~xen-paravirt_ops-some-generic-early-printk-boot-console-fixups +++ a/kernel/printk.c @@ -931,8 +931,16 @@ void register_console(struct console *co { int i; unsigned long flags; + struct console *bootconsole = NULL; - if (preferred_console < 0) + if (console_drivers) { + if (console->flags & CON_BOOT) + return; + if (console_drivers->flags & CON_BOOT) + bootconsole = console_drivers; + } + + if (preferred_console < 0 || bootconsole || !console_drivers) preferred_console = selected_console; /* @@ -978,8 +986,11 @@ void register_console(struct console *co if (!(console->flags & CON_ENABLED)) return; - if (console_drivers && (console_drivers->flags & CON_BOOT)) { - unregister_console(console_drivers); + if (bootconsole) { + printk(KERN_INFO "console handover: boot [%s%d] -> real [%s%d]\n", + bootconsole->name, bootconsole->index, + console->name, console->index); + unregister_console(bootconsole); console->flags &= ~CON_PRINTBUFFER; } @@ -1030,16 +1041,11 @@ int unregister_console(struct console *c } } - /* If last console is removed, we re-enable picking the first - * one that gets registered. Without that, pmac early boot console - * would prevent fbcon from taking over. - * + /* * If this isn't the last console and it has CON_CONSDEV set, we * need to set it on the next preferred console. */ - if (console_drivers == NULL) - preferred_console = selected_console; - else if (console->flags & CON_CONSDEV) + if (console_drivers != NULL && console->flags & CON_CONSDEV) console_drivers->flags |= CON_CONSDEV; release_console_sem(); _ Patches currently in -mm which might be from jeremy@xxxxxxxx are make-hvc_consolec-compile-on-non-powerpc-remove-no_irq.patch xen-paravirt_ops-some-generic-early-printk-boot-console-fixups.patch xen-paravirt_ops-use-the-hvc-console-infrastructure-for-xen-console.patch fixes-and-cleanups-for-earlyprintk-aka-boot-console.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html