lkml.org 
[lkml]   [2004]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject-mm swsusp: fix highmem handling
Hi!

This fixes highmem handling, and adds some comments so that others do
not fall into the same trap I fallen in: code does not continue below
swsusp_arch_resume if things go okay.

Please apply,
Pavel

--- clean-mm/kernel/power/swsusp.c 2004-07-28 23:39:49.000000000 +0200
+++ linux-mm/kernel/power/swsusp.c 2004-08-09 11:54:04.000000000 +0200
@@ -870,8 +866,12 @@
local_irq_disable();
save_processor_state();
error = swsusp_arch_suspend();
+ /* Restore control flow magically appears here */
restore_processor_state();
local_irq_enable();
+#ifdef CONFIG_HIGHMEM
+ restore_highmem();
+#endif
return error;
}

@@ -890,8 +889,12 @@
{
int error;
local_irq_disable();
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();
local_irq_enable();
return error;


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.023 / U:20.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site