lkml.org 
[lkml]   [2004]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: -mm swsusp: fix highmem handling


On Thu, 29 Jul 2004, Pavel Machek wrote:

> Swsusp was not restoring highmem properly. I did not find a nice place
> where to restore it, through, so it went to swsusp_free.

That's too late, and will be called if suspend failed, to clean up any
allocated memory. The proper place seems to be in swsusp_resume().

> I'm not sure why you are saving state before save_processor_state.
> swsusp_arch_resume will overwrite this, anyway. Is it to make something
> balanced?

Yes, so it matches the calls in swsusp_suspend() - Previously there was a
hack that did kernel_fpu_end() after calling save_processor_state(), to
pass in_atomic() checks. By restoring the state after we've snapshotted on
suspend prevents this from being a problem.

In general, if we assume that save_processor_state() does anything to the
CPU, besides just benign register saving, we have to make sure that it's
put into the same state on resume before we restore state..


Pat
-
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:04    [W:0.056 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site