Skip to contentSkip to conversation

early_printk for SGI SN2

PATCH In review Chad Talbott 2 participants 6 messages Jun 18, 2003 – Jun 19, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 early_printk for SGI SN2

This patch requires the console driver that's pending inclusion in Linus' tree, but will not get in the way as long as IA64_EARLY_PRINTK_SGI_SN is config'd off.

Thanks,
Chad

kernel/printk.c +7 -0
diff -Nru a/kernel/printk.c b/kernel/printk.c
@@ -784,6 +784,10 @@
 
 # endif /* CONFIG_IA64_EARLY_PRINTK_UART */
 
+#ifdef CONFIG_IA64_EARLY_PRINTK_SGI_SN
+extern int sal_cons_console_out(const char *str, int len);
+#endif
+
 void early_printk(const char *str, size_t len)
 {
 #ifdef CONFIG_IA64_EARLY_PRINTK_UART
@@ -791,6 +795,9 @@
 #endif
 #ifdef CONFIG_IA64_EARLY_PRINTK_VGA
 	early_printk_vga(str, len);
+#endif
+#ifdef CONFIG_IA64_EARLY_PRINTK_SGI_SN
+ 	sal_cons_console_out(str, len);
 #endif
 }
 
arch/ia64/Kconfig +4 -0
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
@@ -863,6 +831,10 @@
 
 config IA64_EARLY_PRINTK_VGA
 	bool "Early printk on VGA"
+	depends on IA64_EARLY_PRINTK
+
+config IA64_EARLY_PRINTK_SGI_SN
+	bool "Early printk on SGI SN serial console"
 	depends on IA64_EARLY_PRINTK
 
 config DEBUG_SLAB
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Chad Talbott

Chad> This patch requires the console driver that's pending Chad> inclusion in Linus' tree, but will not get in the way as long Chad> as IA64_EARLY_PRINTK_SGI_SN is config'd off.

The patch is basically fine with me, except why is it called sal_cons_console_out(). Does it really have anything to do with SAL? If not, it would be better to use rename it to something SN-specific to avoid confusion (and reduce the risk of namespace collision).

	--david
#2 lore raw
In reply to Chad Talbott
Quoted 4 lines · David Mosberger

The patch is basically fine with me, except why is it called sal_cons_console_out(). Does it really have anything to do with SAL? If not, it would be better to use rename it to something SN-specific to avoid confusion (and reduce the risk of namespace collision).

The name may not be the best. The routines are called sal_* as they use an SGI specific SAL call to actually output the text. Perhaps sn_sal_console_out?

Chad

#3 lore raw
In reply to Chad Talbott
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Chad Talbott

Chad> The name may not be the best. The routines are called sal_* Chad> as they use an SGI specific SAL call to actually output the Chad> text. Perhaps sn_sal_console_out?

Sure, that'd work for me.

	--david
#4 lore raw
In reply to Chad Talbott
Quoted 7 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Chad Talbott

Chad> The name may not be the best. The routines are called sal_* Chad> as they use an SGI specific SAL call to actually output the Chad> text. Perhaps sn_sal_console_out?

Sure, that'd work for me.

Agreed. :)

Here's the changed patch for reference.

kernel/printk.c +7 -0
diff -Nru a/kernel/printk.c b/kernel/printk.c
@@ -784,6 +784,10 @@
 
 # endif /* CONFIG_IA64_EARLY_PRINTK_UART */
 
+#ifdef CONFIG_IA64_EARLY_PRINTK_SGI_SN
+extern int sn_sal_console_out(const char *str, int len);
+#endif
+
 void early_printk(const char *str, size_t len)
 {
 #ifdef CONFIG_IA64_EARLY_PRINTK_UART
@@ -791,6 +795,9 @@
 #endif
 #ifdef CONFIG_IA64_EARLY_PRINTK_VGA
 	early_printk_vga(str, len);
+#endif
+#ifdef CONFIG_IA64_EARLY_PRINTK_SGI_SN
+ 	sn_sal_console_out(str, len);
 #endif
 }
 
arch/ia64/Kconfig +4 -0
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
@@ -863,6 +831,10 @@
 
 config IA64_EARLY_PRINTK_VGA
 	bool "Early printk on VGA"
+	depends on IA64_EARLY_PRINTK
+
+config IA64_EARLY_PRINTK_SGI_SN
+	bool "Early printk on SGI SN serial console"
 	depends on IA64_EARLY_PRINTK
 
 config DEBUG_SLAB
#5 lore raw
In reply to Chad Talbott
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Chad Talbott
Quoted 2 lines · Chad> David Mosberger <[email protected]> writes:
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 18 Jun 2003 15:04:02 -0700, Chad Talbott <[email protected]>

said:

Chad> The name may not be the best. The routines are called sal_* Chad> as they use an SGI specific SAL call to actually output the Chad> text. Perhaps sn_sal_console_out?

Quoted 1 line
Quoted 1 line

Sure, that'd work for me.

Chad> Agreed. :)

Chad> Here's the changed patch for reference.

I applied this now.

Thanks,

	--david