From: frank.hofmann@tomtom.com (Frank Hofmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-pm] [RFC PATCH v4] ARM hibernation/suspend-to-disk support
Date: Thu, 9 Jun 2011 16:30:08 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.00.1106091604180.11513@localhost6.localdomain6> (raw)
In-Reply-To: <201106072348.44624.rjw@sisk.pl>
On Tue, 7 Jun 2011, Rafael J. Wysocki wrote:
> On Tuesday, June 07, 2011, Frank Hofmann wrote:
[ ... ]
>> * there's kind of a circular dependency between CONFIG_HIBERNATION and
>> CONFIG_PM_SLEEP, on ARM. The latter is necessary so that cpu_suspend
>> and cpu_resume are compiled in, but it cannot be selected via
>> ARCH_HIBERNATION_POSSIBLE because CONFIG_PM_SLEEP depends on
>> CONFIG_HIBERNATION_INTERFACE - selected by CONFIG_HIBERNATION.
>>
>> Consequence is that right now, both CONFIG_PM_SLEEP and ...HIBERNATION
>> must be set in your defconfig file to be able to compile.
>
> In fact, CONFIG_PM_SLEEP = CONFIG_SUSPEND || CONFIG_HIBERNATE_CALLBACKS, so it
> should be sufficient to set HIBERNATION. ARCH_HIBERNATION_POSSIBLE only
> causes HIBERNATION to become a valid option (that may or may not be set).
>
>> (my head swirls from writing this ...)
>
> What problem exactly did you have with those settings?
Ah, I tried to do a "select PM_SLEEP" from ARM's ARCH_HIBERNATION_POSSIBLE
... which is circular.
Sorry the noise. It does look like the diff I sent can correctly be
enabled just by selecting CONFIG_HIBERNATION as it's supposed to be, and
CONFIG_PM_SLEEP will be automatically enabled then.
Found a few more nits with the patch as last sent:
- MULTI_CPU configs don't compile, needs changes (Will Deacon is on that)
for cpu_reset.
- the hardcoded v:p offset in swsusp.S needs to go, the value can now
be changed at kernel init and hence a small func to query it is needed
- the patch assumes the codepath is single-cpu (which the framework does
ensure, as disable_nonboot_cpus is called) but also assumes that the
boot CPU has ID 0; only for that is the sleep_save_sp[] entry restored.
At least a WARN_ON(smp_processor_id()) is warranted; having a different
core suspend the system than resume it, I'm not sure ...
- the identity mappings should match what setup_mm_for_reboot does, i.e.
let them cover the whole user range (not just _stext.._etext). That also
makes sure whatever happens during restore, swapper_pg_dir is "virgin"
again afterwards.
Btw, when testing this I found that generic cpu_suspend seems to be just
fine for OMAP3; the OMAP platforms though do not at this time use the
generic cpu_suspend/resume for sleep, is it planned to change that ?
FrankH.
FrankH.
>
> Rafael
>
next prev parent reply other threads:[~2011-06-09 15:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 16:48 [RFC PATCH v4] ARM hibernation/suspend-to-disk support Frank Hofmann
2011-06-07 21:48 ` [linux-pm] " Rafael J. Wysocki
2011-06-09 15:30 ` Frank Hofmann [this message]
2011-06-09 15:40 ` Russell King - ARM Linux
2011-06-09 16:26 ` Frank Hofmann
2011-06-09 16:35 ` Santosh Shilimkar
2011-06-09 17:07 ` Frank Hofmann
2011-06-09 17:10 ` Santosh Shilimkar
2011-06-09 17:14 ` Russell King - ARM Linux
2011-06-09 16:27 ` Santosh Shilimkar
2011-06-09 16:40 ` Russell King - ARM Linux
2011-06-09 16:53 ` Santosh Shilimkar
2011-06-09 17:12 ` Russell King - ARM Linux
2011-06-09 17:21 ` Santosh Shilimkar
2011-06-09 17:53 ` Russell King - ARM Linux
2011-06-21 10:11 ` Russell King - ARM Linux
2011-06-10 12:22 ` Frank Hofmann
2011-06-10 13:43 ` Russell King - ARM Linux
2011-06-10 13:47 ` Frank Hofmann
2011-06-10 14:02 ` Russell King - ARM Linux
2011-06-10 14:54 ` Frank Hofmann
2011-06-09 16:44 ` Frank Hofmann
2011-06-09 16:56 ` Santosh Shilimkar
2011-06-09 16:50 ` Russell King - ARM Linux
2011-06-09 16:53 ` Frank Hofmann
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=alpine.DEB.2.00.1106091604180.11513@localhost6.localdomain6 \
--to=frank.hofmann@tomtom.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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