Skip to contentSkip to conversation

x86_64: be less annoying on boot

PATCH Applied Bill Nottingham 4 participants 10 messages Sep 24, 2008 – Sep 29, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: be less annoying on boot

As long as we're printing mostly useless messages on every boot regardless of debug level, make them 5% more amusing.

(Alternatively, just remove them, of course...)

arch/x86/kernel/head64.c renamed from arch/x86/kernel/head64.c.foo +1 -1
diff -up linux-2.6.26.noarch/arch/x86/kernel/head64.c.foo linux-2.6.26.noarch/arch/x86/kernel/head64.c
@@ -112,7 +112,7 @@ void __init x86_64_start_kernel(char * r
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
+	early_printk("Kernel really alive! It's alive! IT'S ALIIIIIIIIIVE!\n");
 
 	x86_64_start_reservations(real_mode_data);
 }
#1 lore raw
Quoted 6 lines · Bill Nottingham

As long as we're printing mostly useless messages on every boot regardless of debug level, make them 5% more amusing.

(Alternatively, just remove them, of course...)

LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

Ingo

-------------------->

Quoted 1 line

From f6476774f1fe32593d3d71903b1e98514efbf685 Mon Sep 17 00:00:00 2001

From: Bill Nottingham <[email protected]>
Date: Wed, 24 Sep 2008 14:35:17 -0400
Subject: [PATCH] x86_64: be less annoying on boot

Remove mostly useless message on every boot.

---
 arch/x86/kernel/head64.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/x86/kernel/head64.c +0 -2
index 9bfc4d7..11aa501 100644
@@ -112,8 +112,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
-
 	x86_64_start_reservations(real_mode_data);
 }
 
#2 lore raw
Quoted 3 lines · Ingo Molnar
Quoted 1 line

(Alternatively, just remove them, of course...)

LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

Does the 'kernel alive' right before it serve any purpose either?

Bill

#3 lore raw
Quoted 6 lines · Bill Nottingham
Quoted 3 lines · Ingo Molnar
Quoted 1 line

(Alternatively, just remove them, of course...)

LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

Does the 'kernel alive' right before it serve any purpose either?

that has some marginal use: it shows that we are past the really basic system setup code, we decompressed the kernel and entered protected mode with boot paging enabled.

we had bugs in the past where we'd hang/crash after GRUB starts us and before we reach this printk.

OTOH ... forcing it upon all users is strong. Feel free to send another patch that removes it.

Ingo

#4 lore raw

(Cc: added. Mail-Followup-To is evil.)

Quoted 21 lines · Ingo Molnar
Quoted 6 lines · Bill Nottingham
Quoted 3 lines · Ingo Molnar
Quoted 1 line

(Alternatively, just remove them, of course...)

LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

Does the 'kernel alive' right before it serve any purpose either?

that has some marginal use: it shows that we are past the really basic system setup code, we decompressed the kernel and entered protected mode with boot paging enabled.

we had bugs in the past where we'd hang/crash after GRUB starts us and before we reach this printk.

OTOH ... forcing it upon all users is strong. Feel free to send another patch that removes it.

Ingo

#5 lore raw
In reply to Ingo Molnar
Quoted 3 lines · Ingo Molnar

that has some marginal use: it shows that we are past the really basic system setup code, we decompressed the kernel and entered protected mode with boot paging enabled.

What I find annoying about that printk is that I see it even with the "quiet" boot flag.

#6 lore raw
Quoted 8 lines · dcg
Quoted 3 lines · Ingo Molnar

that has some marginal use: it shows that we are past the really basic system setup code, we decompressed the kernel and entered protected mode with boot paging enabled.

What I find annoying about that printk is that I see it even with the "quiet" boot flag.

that's a property of early_printk() - it just doesnt listen to any of the normal printk modifiers. (and that's the point of early_printk())

could you please send a patch that only calls that early_printk() if console_loglevel == 10? (i.e. if "debug" has been passed)

Ingo

#7 lore raw
Quoted 2 lines · Ingo Molnar

could you please send a patch that only calls that early_printk() if console_loglevel == 10? (i.e. if "debug" has been passed)

Sure, here it is.

Honour "quiet" boot parameter in early_printk() calls

---
 arch/x86/kernel/head64.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/x86/kernel/head64.c +4 -2
Index: 2.6/arch/x86/kernel/head64.c
===================================================================
@@ -108,11 +108,13 @@
 	}
 	load_idt((const struct desc_ptr *)&idt_descr);
 
-	early_printk("Kernel alive\n");
+	if (console_loglevel == 10)
+		early_printk("Kernel alive\n");
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
+	if (console_loglevel == 10)
+		early_printk("Kernel really alive\n");
 
 	x86_64_start_reservations(real_mode_data);
 }
Applied
#8 lore raw
Quoted 6 lines · dcg
Quoted 2 lines · Ingo Molnar

could you please send a patch that only calls that early_printk() if console_loglevel == 10? (i.e. if "debug" has been passed)

Quoted 8 lines

Sure, here it is.

Honour "quiet" boot parameter in early_printk() calls

applied to tip/x86/debug, thanks Diego.

If anyone can see other too-verbose-bootup-message annoyances during default distro bootups, please send patches.

Ingo

#9 lore raw
In reply to Ingo Molnar
Quoted 6 lines · Ingo Molnar

that's a property of early_printk() - it just doesnt listen to any of the normal printk modifiers. (and that's the point of early_printk())

could you please send a patch that only calls that early_printk() if console_loglevel == 10? (i.e. if "debug" has been passed)

That would be useless because the parameters are not parsed at this point.

I personally find this early printk very useful for the reason Ingo noted earlier (you know you're already past the boot loader). And that can be very useful in debugging. Even for that that anonymous "quiet" person who posted earlier. Two are not needed though.

-Andi

Signature · 1 line
[email protected]