Commit e537c55c authored by Stefan Seyfried's avatar Stefan Seyfried Committed by Linus Torvalds

[PATCH] swsusp: fix highmem

From: Pavel Machek <pavel@ucw.cz>

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.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6ff6ffce
......@@ -856,7 +856,9 @@ int swsusp_suspend(void)
local_irq_disable();
save_processor_state();
error = swsusp_arch_suspend();
/* Restore control flow magically appears here */
restore_processor_state();
restore_highmem();
local_irq_enable();
return error;
}
......@@ -876,8 +878,13 @@ int swsusp_resume(void)
{
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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment