Messages in this thread | | | Date | Thu, 27 Feb 2014 23:18:19 +0100 | From | Pavel Machek <> | Subject | Re: [PATCH v3 3/3] ARM hibernation / suspend-to-disk |
| |
Hi! On Tue 2014-02-25 16:02:00, Sebastian Capella wrote: > From: Russ Dill <Russ.Dill@ti.com> > > Enable hibernation for ARM architectures and provide ARM > architecture specific calls used during hibernation. > > The swsusp hibernation framework depends on the > platform first having functional suspend/resume. > > Then, in order to enable hibernation on a given platform, a > platform_hibernation_ops structure may need to be registered with > the system in order to save/restore any SoC-specific / cpu specific > state needing (re)init over a suspend-to-disk/resume-from-disk cycle. > > For example: > > - "secure" SoCs that have different sets of control registers > and/or different CR reg access patterns. > > - SoCs with L2 caches as the activation sequence there is > SoC-dependent; a full off-on cycle for L2 is not done > by the hibernation support code. > > - SoCs requiring steps on wakeup _before_ the "generic" parts > done by cpu_suspend / cpu_resume can work correctly. > > - SoCs having persistent state which is maintained during suspend > and resume, but will be lost during the power off cycle after > suspend-to-disk. > > This is a rebase/rework of Frank Hofmann's v5 hibernation patchset. >
> +/* > + * Snapshot kernel memory and reset the system. > + * soft_restart is not technically needed, but is used > + * to get success returned from cpu_suspend. > + * After resume, the hibernation snapshot is written out. > + */ > +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; > +}
This is static, so maybe arch_save_image() is better name?
> +static u8 __swsusp_resume_stk[PAGE_SIZE/2] __nosavedata;
resume_stack?
Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |