public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* swsusp: fix highmem
@ 2004-08-17 11:03 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2004-08-17 11:03 UTC (permalink / raw)
  To: Andrew Morton, kernel list, Patrick Mochel

Hi!

This actually calls highmem_resume(), so swsusp has chance to work on
highmem machines. It also adds comments about code flow, which is
quite interesting at that point.

Please apply,
								Pavel 

--- clean-mm/kernel/power/swsusp.c	2004-08-17 12:21:44.000000000 +0200
+++ linux-mm/kernel/power/swsusp.c	2004-08-17 13:01:35.000000000 +0200
@@ -854,8 +854,10 @@
 	local_irq_disable();
 	save_processor_state();
 	error = swsusp_arch_suspend();
+	/* Restore control flow magically appears here */
 	restore_processor_state();
 	local_irq_enable();
+	restore_highmem();
 	return error;
 }
 
@@ -874,8 +876,13 @@
 {
 	int error;
 	local_irq_disable();
+	/* We'll ignore saved state, but this gets preempt count (etc) right */
 	save_processor_state();
 	error = swsusp_arch_resume();
+	/* Code below is only ever reached in case of failure. Otherwise
+	 * execution continues at place where swsusp_arch_suspend was called
+         */
+	BUG_ON(!error);
 	restore_processor_state();
 	restore_highmem();
 	local_irq_enable();


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-17 11:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 11:03 swsusp: fix highmem Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox