[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140227221819.GA6910@amd.pavel.ucw.cz>
Date: Thu, 27 Feb 2014 23:18:19 +0100
From: Pavel Machek <pavel@....cz>
To: Sebastian Capella <sebastian.capella@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linaro-kernel@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org, Russ Dill <Russ.Dill@...com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Russell King <linux@....linux.org.uk>,
Len Brown <len.brown@...el.com>,
Nicolas Pitre <nico@...aro.org>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Will Deacon <will.deacon@....com>,
Jonathan Austin <jonathan.austin@....com>,
Catalin Marinas <catalin.marinas@....com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Stephen Boyd <sboyd@...eaurora.org>
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists