Skip to contentSkip to conversation

no console disabling during suspend stage

PATCH In review Rodolfo Giometti 2 participants 2 messages Jul 19, 2006 – Jul 21, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 no console disabling during suspend stage

Hello,

here a little patch to avoid disabling console during suspend stage while we are debugging kernel.

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
power/main.c.new renamed from power/main.c +2 -0
@@ -86,7 +86,9 @@
 			goto Thaw;
 	}
 
+#ifndef CONFIG_DEBUG_KERNEL
 	suspend_console();
+#endif
 	if ((error = device_suspend(PMSG_SUSPEND))) {
 		printk(KERN_ERR "Some devices failed to suspend\n");
 		goto Finish;
#1 lore raw
Quoted 8 lines · On Wed, 19 Jul 2006 11:16:00 +0200 Rodolfo Giometti <[email protected]> wrote:

here a little patch to avoid disabling console during suspend stage while we are debugging kernel.

...

power/main.c.new line 91

Quoted 6 lines
power/main.c.new renamed from power/main.c +2 -0
@@ -86,7 +86,9 @@
 			goto Thaw;
 	}
 
+#ifndef CONFIG_DEBUG_KERNEL
 	suspend_console();
+#endif

CONFIG_DEBUG_KERNEL is not really the appropriate thing to use here - it's more a user-interface/Kconfig level thing.

Can you please describe the problems which suspend_console() are causing?

Some runtime knob might be more appropriate. Perhaps /sys/power/debug?

If the suspend_console() call is to be disabled then you'll want to disable the matching resume_console() call too.

printk.c needs sem2mutex conversion.

The console_suspended/secondary_console_sem handling is racy. Bad Linus. But as we're running on a single CPU and all other tasks are frozen it doesn't matter.