lkml.org 
[lkml]   [2014]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v1 3/3] ARM hibernation / suspend-to-disk
On Tue, Feb 25, 2014 at 05:55:31PM +0000, Sebastian Capella wrote:
> Quoting Lorenzo Pieralisi (2014-02-25 03:32:51)
> > On Sun, Feb 23, 2014 at 08:02:08PM +0000, Sebastian Capella wrote:
> > > I'll go with leaving the soft_restart as is unless someone feels
> > > strongly against.
> >
> > Leaving it as it is is fine for now, but should be commented, because that's
> > not clear why it is needed by just reading the code.
>
> Hi Lorenzo,
>
> How is something like this?
>
> /*
> * Snapshot kernel memory and reset the system.

Please add:

"swsusp_save() is executed in the suspend finisher so that the CPU context
pointer and memory are part of the saved image, which is required by the
resume kernel image to restart execution from swsusp_arch_suspend()"

> * soft_restart is not technically needed, but is used
> * to get success returned from cpu_suspend.
> * After resume, the hibernation snapshot is written out.

"When soft reboot completes, the hibernation snapshot is written out."

Resume is confusing since this code is resuming twice :D on image saving
and on kernel image restoration.

Lorenzo

> */
> static int notrace __swsusp_arch_save_image(unsigned long unused)
> {
> int ret;
>
> ret = swsusp_save();
> if (ret == 0)
> soft_restart(virt_to_phys(cpu_resume));
> return ret;
> }
>
> Thanks again for all of the feedback!
>
> Sebastian
>



\
 
 \ /
  Last update: 2014-02-26 12:01    [W:0.075 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site