Re: [patch] Fixes and cleanups for earlyprintk aka boot console.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, March 2, 2007 - 12:46 am

On Tue, 20 Feb 2007 12:35:49 +0100 Gerd Hoffmann <kraxel@suse.de> wrote:


It blows up on powerpc:

drivers/built-in.o(.init.text+0x2080): In function `.console_init':
: undefined reference to `.disable_early_printk'

and the below patch might help.

But my confidence level isn't high so I'll drop it for now.  I have a feeling
this will need careful testing.

--- a/arch/x86_64/kernel/early_printk.c~fixes-and-cleanups-for-earlyprintk-aka-boot-console-fix
+++ a/arch/x86_64/kernel/early_printk.c
@@ -249,17 +249,3 @@ static int __init setup_early_printk(cha
 }
 
 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~fixes-and-cleanups-for-earlyprintk-aka-boot-console-fix drivers/char/tty_io.c
--- a/drivers/char/tty_io.c~fixes-and-cleanups-for-earlyprintk-aka-boot-console-fix
+++ 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 *);
@@ -3889,13 +3887,6 @@ void __init console_init(void)
 	/* Setup the default TTY line discipline. */
 	(void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY);
 
-	/*
-	 * 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)();
_

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch] Fixes and cleanups for earlyprintk aka boot co ..., Andrew Morton, (Fri Mar 2, 12:46 am)
Re: [patch] Fixes and cleanups for earlyprintk aka boot co ..., Jeremy Fitzhardinge, (Fri Mar 2, 9:06 am)