[parisc-linux-cvs] linux-2.5 tausq

Randolph Chung Randolph Chung <randolph@tausq.org>
Wed, 30 Oct 2002 22:14:09 -0800


> Log message:
> Re-enable hack from our 2.4 tree for pdc console debug

I was hoping we can figure out some way to fix this properly, but since
it looks like it won't be done for a little bit, I've reenabled this for
now...

Index: arch/parisc/kernel/pdc_cons.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/pdc_cons.c,v
retrieving revision 1.5
diff -u -p -r1.5 pdc_cons.c
--- arch/parisc/kernel/pdc_cons.c	9 Oct 2002 14:31:05 -0000	1.5
+++ arch/parisc/kernel/pdc_cons.c	31 Oct 2002 06:07:14 -0000
@@ -70,7 +70,7 @@ static struct console pdc_cons = {
 	write:		pdc_console_write,
 	device:		PDC_CONSOLE_DEVICE,
 	setup:		pdc_console_setup,
-	flags:		CON_PRINTBUFFER|CON_ENABLED,
+	flags:		CON_BOOT|CON_PRINTBUFFER|CON_ENABLED,
 	index:		-1,
 };
 
@@ -93,7 +93,7 @@ static void pdc_console_init_force(void)
 	register_console(&pdc_cons);
 }
 
-void pdc_console_init(void)
+void __init pdc_console_init(void)
 {
 #if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE)
 	pdc_console_init_force();
Index: kernel/printk.c
===================================================================
RCS file: /var/cvs/linux-2.5/kernel/printk.c,v
retrieving revision 1.6
diff -u -p -r1.6 printk.c
--- kernel/printk.c	17 Oct 2002 20:43:50 -0000	1.6
+++ kernel/printk.c	31 Oct 2002 06:07:14 -0000
@@ -637,6 +637,11 @@ void register_console(struct console * c
 	if (!(console->flags & CON_ENABLED))
 		return;
 
+	if (console_drivers && (console_drivers->flags & CON_BOOT)) {
+		unregister_console(console_drivers);
+		console->flags &= ~CON_PRINTBUFFER;
+	}
+
 	/*
 	 *	Put this console in the list - keep the
 	 *	preferred driver at the head of the list.
Index: include/linux/console.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/linux/console.h,v
retrieving revision 1.2
diff -u -p -r1.2 console.h
--- include/linux/console.h	18 Jul 2002 16:17:11 -0000	1.2
+++ include/linux/console.h	31 Oct 2002 06:07:14 -0000
@@ -90,6 +90,7 @@ extern struct console_cmdline console_li
 #define CON_PRINTBUFFER	(1)
 #define CON_CONSDEV	(2) /* Last on the command line */
 #define CON_ENABLED	(4)
+#define CON_BOOT	(8)
 
 struct console
 {

-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/