Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound when booted, USB-related WARNING

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Thursday, September 20, 2007 - 2:08 pm

Rafael,

On Thu, 2007-09-20 at 22:39 +0200, Rafael J. Wysocki wrote:

In meantime I figured out what's happening. The ordering in
hibernate_snapshot() is wrong. It does:

	swsusp_shrink_memory();
        suspend_console();
        device_suspend(PMSG_FREEZE);
        platform_prepare(platform_mode);

	disable_nonboot_cpus();

        swsusp_suspend();

	enable_nonboot_cpus();

	platform_finish(platform_mode);
        device_resume();
        resume_console();

We disable everything in device_suspend() including timekeeping, so any
code which is depending on working timekeeping and timer functionality
(which is suspended in timekeeping_suspend() as well) is busted.

enable_nonboot_cpus() definitely relies on working timekeeping and
timers depending on the codepath. It's just a surprise that this did not
blow up earlier (also before clock events).

I changed the ordering of the above to:

	disable_nonboot_cpus();

	swsusp_shrink_memory();
        suspend_console();
        device_suspend(PMSG_FREEZE);
        platform_prepare(platform_mode);
        swsusp_suspend();
	platform_finish(platform_mode);
        device_resume();
        resume_console();

	enable_nonboot_cpus();

and non-surprisingly the "my VAIO needs help from keyboard" problem went
away immediately. See patch below. (on top of rc7-hrt1, -mm1 does not
work at all on my VAIO due to some yet not identified wreckage)

I did not yet look into the suspend to ram code, but I guess that there
is an equivalent problem.

But I have no idea why this affects Andrews jinxed VAIO (UP machine),
though I suspect that we have more timekeeping/timer depending code
somewhere waiting to bite us.

Also I still need to debug why the HIBERNATION_TEST code path (which has
a msleep(5000) in it) does not fail, but I postpone this until tomorrow
morning. I'm dead tired after hunting this Heisenbug which changes with
every other printk added to the code. I'm going to add some really noisy
messages for everything which accesses timekeeping / timers _after_
those systems have been shut down.

We really need to fix this once and forever _before_ 2.6.23 final, even
if it requires a -rc8.

Thanks,

	tglx

--- a/kernel/power/disk.c	2007-09-11 09:25:24.000000000 +0200
+++ b/kernel/power/disk.c	2007-09-20 22:47:30.000000000 +0200
@@ -130,10 +130,14 @@ int hibernation_snapshot(int platform_mo
 {
 	int error;
 
+	error = disable_nonboot_cpus();
+	if (error)
+		goto resume_cpus;
+
 	/* Free memory before shutting down devices. */
 	error = swsusp_shrink_memory();
 	if (error)
-		return error;
+		goto resume_cpus;
 
 	suspend_console();
 	error = device_suspend(PMSG_FREEZE);
@@ -144,23 +148,22 @@ int hibernation_snapshot(int platform_mo
 	if (error)
 		goto Resume_devices;
 
-	error = disable_nonboot_cpus();
-	if (!error) {
-		if (hibernation_mode != HIBERNATION_TEST) {
-			in_suspend = 1;
-			error = swsusp_suspend();
-			/* Control returns here after successful restore */
-		} else {
-			printk("swsusp debug: Waiting for 5 seconds.\n");
-			mdelay(5000);
-		}
+	if (hibernation_mode != HIBERNATION_TEST) {
+		in_suspend = 1;
+		error = swsusp_suspend();
+		/* Control returns here after successful restore */
+	} else {
+		printk("swsusp debug: Waiting for 5 seconds.\n");
+		mdelay(5000);
 	}
-	enable_nonboot_cpus();
+
  Resume_devices:
 	platform_finish(platform_mode);
 	device_resume();
  Resume_console:
 	resume_console();
+resume_cpus:
+	enable_nonboot_cpus();
 	return error;
 }
 



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

Messages in current thread:
2.6.23-rc6-mm1, Andrew Morton, (Tue Sep 18, 1:18 am)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Tue Sep 18, 1:24 am)
Re: 2.6.23-rc6-mm1, Kamalesh Babulal, (Tue Sep 18, 2:13 am)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Tue Sep 18, 2:27 am)
Re: 2.6.23-rc6-mm1, Andy Whitcroft, (Tue Sep 18, 2:34 am)
Re: 2.6.23-rc6-mm1, Satyam Sharma, (Tue Sep 18, 2:34 am)
Re: 2.6.23-rc6-mm1, Benjamin Herrenschmidt, (Tue Sep 18, 3:02 am)
Re: 2.6.23-rc6-mm1, Kamalesh Babulal, (Tue Sep 18, 5:07 am)
Re: 2.6.23-rc6-mm1, Valdis.Kletnieks, (Tue Sep 18, 8:07 am)
Re: 2.6.23-rc6-mm1, Miles Lane, (Tue Sep 18, 8:27 am)
Re: 2.6.23-rc6-mm1, Miles Lane, (Tue Sep 18, 8:39 am)
modpost errors ( Re: 2.6.23-rc6-mm1), Gabriel C, (Tue Sep 18, 8:43 am)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Tue Sep 18, 8:50 am)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Tue Sep 18, 8:52 am)
Re: modpost errors ( Re: 2.6.23-rc6-mm1), Sam Ravnborg, (Tue Sep 18, 8:56 am)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Tue Sep 18, 9:53 am)
Re: 2.6.23-rc6-mm1 (watchdog), Randy Dunlap, (Tue Sep 18, 10:18 am)
Re: 2.6.23-rc6-mm1, Miles Lane, (Tue Sep 18, 10:20 am)
Re: 2.6.23-rc6-mm1 (watchdog), Randy Dunlap, (Tue Sep 18, 10:41 am)
Re: 2.6.23-rc6-mm1, Mel Gorman, (Tue Sep 18, 10:44 am)
Re: 2.6.23-rc6-mm1, Mel Gorman, (Tue Sep 18, 11:05 am)
Re: 2.6.23-rc6-mm1, Greg KH, (Tue Sep 18, 12:16 pm)
Re: 2.6.23-rc6-mm1, Greg KH, (Tue Sep 18, 12:17 pm)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Tue Sep 18, 12:17 pm)
2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity, Valdis.Kletnieks, (Tue Sep 18, 12:32 pm)
Re: 2.6.23-rc6-mm1, Miles Lane, (Tue Sep 18, 12:42 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, Rafael J. Wysocki, (Tue Sep 18, 1:21 pm)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Tue Sep 18, 1:26 pm)
Re: 2.6.23-rc6-mm1 sparc build error, Mathieu Desnoyers, (Tue Sep 18, 1:54 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, Rafael J. Wysocki, (Tue Sep 18, 1:54 pm)
Re: 2.6.23-rc6-mm1 sparc build error, Andrew Morton, (Tue Sep 18, 2:05 pm)
Re: 2.6.23-rc6-mm1, Benjamin Herrenschmidt, (Tue Sep 18, 2:35 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Tue Sep 18, 2:37 pm)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Mariusz Kozlowski, (Tue Sep 18, 2:45 pm)
Re: 2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity, Valdis.Kletnieks, (Tue Sep 18, 3:03 pm)
Re: [v4l-dvb-maintainer] modpost errors ( Re: 2.6.23-rc6-mm1), Mauro Carvalho Chehab, (Tue Sep 18, 3:06 pm)
Re: 2.6.23-rc6-mm1, Gabriel C, (Tue Sep 18, 3:38 pm)
Re: 2.6.23-rc6-mm1, Gabriel C, (Tue Sep 18, 3:48 pm)
Re: 2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity, Sam Ravnborg, (Wed Sep 19, 12:34 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Cornelia Huck, (Wed Sep 19, 1:27 am)
2.6.23-rc6-mm1 -- powerpc link failure, Andy Whitcroft, (Wed Sep 19, 2:28 am)
X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Jiri Slaby, (Wed Sep 19, 4:43 am)
Re: 2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity, Valdis.Kletnieks, (Wed Sep 19, 8:53 am)
2.6.23-rc6-mm1: kgdb support on ppc64 utterly broken, Mel Gorman, (Wed Sep 19, 9:29 am)
Re: 2.6.23-rc6-mm1 -- powerpc link failure, Segher Boessenkool, (Wed Sep 19, 9:36 am)
2.6.23-rc6-mm1 -- mkfs stuck in 'D', Andy Whitcroft, (Wed Sep 19, 9:43 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Mariusz Kozlowski, (Wed Sep 19, 9:43 am)
Re: 2.6.23-rc6-mm1 -- powerpc link failure, Andy Whitcroft, (Wed Sep 19, 9:52 am)
Re: 2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity, Sam Ravnborg, (Wed Sep 19, 10:39 am)
Re: 2.6.23-rc6-mm1 -- powerpc link failure, Sam Ravnborg, (Wed Sep 19, 10:44 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Wed Sep 19, 10:44 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Cornelia Huck, (Wed Sep 19, 11:02 am)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Wed Sep 19, 11:48 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Andrew Morton, (Wed Sep 19, 12:10 pm)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Wed Sep 19, 12:33 pm)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Hugh Dickins, (Wed Sep 19, 1:03 pm)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Wed Sep 19, 1:32 pm)
Re: 2.6.23-rc6-mm1, Gabriel C, (Wed Sep 19, 1:36 pm)
Re: 2.6.23-rc6-mm1, Sam Ravnborg, (Wed Sep 19, 1:43 pm)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Peter Zijlstra, (Wed Sep 19, 1:44 pm)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Andrew Morton, (Wed Sep 19, 2:42 pm)
Re: 2.6.23-rc6-mm1, Tilman Schmidt, (Wed Sep 19, 4:02 pm)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Wed Sep 19, 4:24 pm)
Re: 2.6.23-rc6-mm1, Chuck Ebbert, (Wed Sep 19, 4:28 pm)
Re: 2.6.23-rc6-mm1, David Brownell, (Wed Sep 19, 4:44 pm)
Re: 2.6.23-rc6-mm1, Tilman Schmidt, (Wed Sep 19, 4:55 pm)
Re: 2.6.23-rc6-mm1, Joseph Fannin, (Wed Sep 19, 4:58 pm)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Wed Sep 19, 5:06 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Wed Sep 19, 5:06 pm)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Wed Sep 19, 5:09 pm)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Andrew Morton, (Wed Sep 19, 7:24 pm)
Re: 2.6.23-rc6-mm1, David Brownell, (Wed Sep 19, 9:43 pm)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Wed Sep 19, 11:11 pm)
Re: 2.6.23-rc6-mm1, Kay Sievers, (Thu Sep 20, 12:54 am)
Re: 2.6.23-rc6-mm1 - make access to tasks nsproxy ligther ..., Cedric Le Goater, (Thu Sep 20, 1:41 am)
Re: 2.6.23-rc6-mm1, Alessandro Zummo, (Thu Sep 20, 1:51 am)
Re: 2.6.23-rc6-mm1 - make access to tasks nsproxy ligther ..., Cedric Le Goater, (Thu Sep 20, 2:12 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Hugh Dickins, (Thu Sep 20, 4:31 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Peter Zijlstra, (Thu Sep 20, 5:15 am)
Re: 2.6.23-rc6-mm1 sparc build error, Guennadi Liakhovetski, (Thu Sep 20, 5:53 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Thu Sep 20, 6:17 am)
Build failure on ppc64 drivers/block/ps3disk.c, Mel Gorman, (Thu Sep 20, 6:25 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 6:29 am)
Re: Build failure on ppc64 drivers/block/ps3disk.c, Jens Axboe, (Thu Sep 20, 6:32 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Cornelia Huck, (Thu Sep 20, 6:35 am)
2.6.23-rc6-mm1: Build failures on ppc64_defconfig, Satyam Sharma, (Thu Sep 20, 6:37 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 7:12 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 7:47 am)
Re: 2.6.23-rc6-mm1, David Brownell, (Thu Sep 20, 9:15 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Pierre Ossman, (Thu Sep 20, 9:30 am)
Re: 2.6.23-rc6-mm1 - make access to tasks nsproxy ligther ..., Cedric Le Goater, (Thu Sep 20, 10:08 am)
Re: kobject: Temporarily save k_name on cleanup for debug ..., Mariusz Kozlowski, (Thu Sep 20, 10:26 am)
Re: 2.6.23-rc6-mm1: atomic counter underflow, Mariusz Kozlowski, (Thu Sep 20, 10:27 am)
Re: 2.6.23-rc6-mm1, David Brownell, (Thu Sep 20, 10:36 am)
Re: 2.6.23-rc6-mm1, Tilman Schmidt, (Thu Sep 20, 12:10 pm)
Re: 2.6.23-rc6-mm1, Tilman Schmidt, (Thu Sep 20, 12:20 pm)
Re: 2.6.23-rc6-mm1, Andrew Morton, (Thu Sep 20, 1:25 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 1:39 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 1:42 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Thomas Gleixner, (Thu Sep 20, 2:08 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 2:45 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 2:54 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 3:30 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Thu Sep 20, 3:35 pm)
Re: 2.6.23-rc6-mm1, Tilman Schmidt, (Thu Sep 20, 5:53 pm)
Re: [PATCH] Remove broken netfilter binary sysctls from br ..., Eric W. Biederman, (Thu Sep 20, 9:21 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Fri Sep 21, 2:24 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Fri Sep 21, 2:25 am)
Re: 2.6.23-rc6-mm1 sparc build error, Mathieu Desnoyers, (Fri Sep 21, 6:51 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Fri Sep 21, 7:20 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Fri Sep 21, 10:16 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Fri Sep 21, 10:18 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Fri Sep 21, 10:54 am)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Fri Sep 21, 12:20 pm)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Fri Sep 21, 12:33 pm)
Re: 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound ..., Rafael J. Wysocki, (Fri Sep 21, 12:37 pm)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Fengguang Wu, (Fri Sep 21, 6:55 pm)
Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig, Satyam Sharma, (Fri Sep 21, 11:50 pm)
Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig, Satyam Sharma, (Fri Sep 21, 11:51 pm)
Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig, Satyam Sharma, (Fri Sep 21, 11:54 pm)
Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig, Satyam Sharma, (Sat Sep 22, 12:25 am)
[PATCH -mm] iseries_veth: Kill unused variable, Satyam Sharma, (Sat Sep 22, 12:55 am)
Re: 2.6.23-rc6-mm1, Satyam Sharma, (Sat Sep 22, 1:41 am)
Re: 2.6.23-rc6-mm1, Satyam Sharma, (Sat Sep 22, 2:21 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Peter Zijlstra, (Sat Sep 22, 6:16 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Fengguang Wu, (Sat Sep 22, 6:20 pm)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Peter Zijlstra, (Sun Sep 23, 6:02 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Fengguang Wu, (Sun Sep 23, 8:01 pm)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Sun Sep 23, 8:25 pm)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Peter Zijlstra, (Mon Sep 24, 12:35 am)
Re: X-freeze after clflush changes [Was: 2.6.23-rc6-mm1], Valdis.Kletnieks, (Mon Sep 24, 12:37 am)
Re: 2.6.23-rc6-mm1 -- mkfs stuck in 'D', Fengguang Wu, (Mon Sep 24, 1:12 am)
Re: 2.6.23-rc6-mm1, Mel Gorman, (Mon Sep 24, 4:14 am)
Re: [PATCH] Remove broken netfilter binary sysctls from br ..., Stephen Hemminger, (Mon Sep 24, 1:14 pm)
Re: 2.6.23-rc6-mm1, Greg KH, (Mon Sep 24, 10:35 pm)
Re: 2.6.23-rc6-mm1 -- powerpc link failure, Andy Whitcroft, (Tue Sep 25, 6:40 am)
Re: [PATCH] Remove broken netfilter binary sysctls from br ..., Eric W. Biederman, (Tue Sep 25, 7:03 am)
Re: [PATCH] Remove broken netfilter binary sysctls from br ..., Stephen Hemminger, (Tue Sep 25, 9:12 am)
Re: [PATCH] Remove broken netfilter binary sysctls from br ..., Eric W. Biederman, (Tue Sep 25, 9:38 am)