From: ccross@android.com (Colin Cross)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] CPU PM notifiers
Date: Thu, 10 Feb 2011 13:31:24 -0800 [thread overview]
Message-ID: <1297373487-23902-1-git-send-email-ccross@android.com> (raw)
This patch set tries to address Russell's concerns with platform
pm code calling into the driver for every block in the Cortex A9s
during idle, hotplug, and suspend. The first patch adds cpu pm
notifiers that can be called by platform code, the second uses
the notifier to save and restore the GIC state, and the third
saves the VFP state.
The notifiers are used for two types of events, CPU PM events and
CPU complex PM events. CPU PM events are used to save per-cpu
context when a single CPU is preparing to enter or has just exited
a low power state. For example, the VFP saves the last thread
context, and the GIC saves banked CPU registers.
CPU complex events are used after all the CPUs in a power domain
have been prepared for the low power state. The GIC uses these
events to save global register state.
What is not included:
* Multiple power states - it is assumed that if the platform
code calls cpu_pm_enter(), every listener needs to save
its context.
* L2 cache - The L2 cache will need very different behavior
depending on the HW implementation and power mode being
entered.
Both problems could be solved be defining a set of power states
shared by all platforms, if an agreeable set exists. For example:
* CPU reset (TWD, GIC, VFP), L1 retention, L2 untouched
* CPU reset + L1 lost, L2 retention
* CPU reset, L1 + L2 lost
Santosh previously mentioned that the GIC is not reset in the first
two states on OMAP, which starts to make the list complicated. Does
disabling the GIC cause a problem in these states?
An alternate solution is to pass a set of flags instead of a power state:
CPU_PM_LOCALTIMERS_RESET
CPU_PM_INTERRUPTS_RESET
CPU_PM_L1_RETENTION
CPU_PM_L1_RESET
CPU_PM_L2_RETENTION
CPU_PM_L2_RESET
arch/arm/common/gic.c | 204 +++++++++++++++++++++++++++++++++++++++++
arch/arm/include/asm/cpu_pm.h | 123 +++++++++++++++++++++++++
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/cpu_pm.c | 116 +++++++++++++++++++++++
arch/arm/vfp/vfpmodule.c | 24 +++++
5 files changed, 468 insertions(+), 0 deletions(-)
next reply other threads:[~2011-02-10 21:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 21:31 Colin Cross [this message]
2011-02-10 21:31 ` [RFC PATCH 1/3] ARM: Add cpu power management notifiers Colin Cross
2011-02-12 14:46 ` Russell King - ARM Linux
2011-02-10 21:31 ` [RFC PATCH 2/3] ARM: gic: Use cpu pm notifiers to save gic state Colin Cross
2011-02-18 0:58 ` Colin Cross
2011-02-10 21:31 ` [RFC PATCH 3/3] ARM: vfp: Use cpu pm notifiers to save vfp state Colin Cross
2011-02-11 12:12 ` Catalin Marinas
2011-02-11 12:24 ` Russell King - ARM Linux
2011-02-11 12:55 ` Catalin Marinas
2011-02-11 19:50 ` Colin Cross
2011-02-13 21:25 ` Colin Cross
2011-02-12 10:23 ` [RFC PATCH 0/3] CPU PM notifiers Santosh Shilimkar
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=1297373487-23902-1-git-send-email-ccross@android.com \
--to=ccross@android.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;
as well as URLs for NNTP newsgroup(s).