From: Pavel Machek <pavel@ucw.cz>
To: Sebastian Capella <sebastian.capella@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linaro-kernel@lists.linaro.org,
linux-arm-kernel@lists.infradead.org,
"Russ Dill" <Russ.Dill@ti.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Russell King" <linux@arm.linux.org.uk>,
"Len Brown" <len.brown@intel.com>,
"Nicolas Pitre" <nico@linaro.org>,
"Santosh Shilimkar" <santosh.shilimkar@ti.com>,
"Will Deacon" <will.deacon@arm.com>,
"Jonathan Austin" <jonathan.austin@arm.com>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Stephen Boyd" <sboyd@codeaurora.org>
Subject: Re: [PATCH v3 3/3] ARM hibernation / suspend-to-disk
Date: Thu, 27 Feb 2014 23:18:19 +0100 [thread overview]
Message-ID: <20140227221819.GA6910@amd.pavel.ucw.cz> (raw)
In-Reply-To: <1393372920-3896-4-git-send-email-sebastian.capella@linaro.org>
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
prev parent reply other threads:[~2014-02-27 22:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 0:01 [PATCH v3 0/3] hibernation support on ARM Sebastian Capella
2014-02-26 0:01 ` [PATCH v3 1/3] Fix hibernation restore hang in freeze_processes Sebastian Capella
2014-02-26 0:37 ` Rafael J. Wysocki
2014-02-26 0:01 ` [PATCH v3 2/3] ARM: avoid tracers in soft_restart Sebastian Capella
2014-02-26 0:02 ` [PATCH v3 3/3] ARM hibernation / suspend-to-disk Sebastian Capella
2014-02-27 22:18 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140227221819.GA6910@amd.pavel.ucw.cz \
--to=pavel@ucw.cz \
--cc=Russ.Dill@ti.com \
--cc=catalin.marinas@arm.com \
--cc=jonathan.austin@arm.com \
--cc=len.brown@intel.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nico@linaro.org \
--cc=rjw@rjwysocki.net \
--cc=santosh.shilimkar@ti.com \
--cc=sboyd@codeaurora.org \
--cc=sebastian.capella@linaro.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®