From: Kevin Hilman <khilman@ti.com>
To: Todd Poynor <toddpoynor@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] ARM: Call idle notifiers
Date: Thu, 07 Jul 2011 10:08:55 -0700 [thread overview]
Message-ID: <874o2ydnmg.fsf@ti.com> (raw)
In-Reply-To: <1309229190-25006-3-git-send-email-toddpoynor@google.com> (Todd Poynor's message of "Mon, 27 Jun 2011 19:46:29 -0700")
Todd Poynor <toddpoynor@google.com> writes:
> Change-Id: Id833e61c13baa1783705ac9e9046d1f0cc90c95e
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
I don't think the notifiers should be called in ARM-generic code.
As discussed w/Colin in his proposal for the CPU PM notifiers, the
platform-specific code should decide when to run notifier chain.
To give an example, on OMAP we wouldn't want the notifier chain to be
run until the OMAP PM core has programmed the next states of the various
power domains. That way the notifier functions could check the next
state to determine if their powerdomain is going to retention or off and
decide whether or not a context save/restore will be needed.
Kevin
> ---
> arch/arm/kernel/process.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index 5e1e541..1b9101e 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -184,6 +184,7 @@ void cpu_idle(void)
> while (1) {
> tick_nohz_stop_sched_tick(1);
> leds_event(led_idle_start);
> + idle_notifier_call_chain(IDLE_START);
> while (!need_resched()) {
> #ifdef CONFIG_HOTPLUG_CPU
> if (cpu_is_offline(smp_processor_id()))
> @@ -208,6 +209,7 @@ void cpu_idle(void)
> }
> }
> leds_event(led_idle_end);
> + idle_notifier_call_chain(IDLE_END);
> tick_nohz_restart_sched_tick();
> preempt_enable_no_resched();
> schedule();
next prev parent reply other threads:[~2011-07-07 17:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 2:46 [PATCH 0/3] Add generic idle notifiers Todd Poynor
2011-06-28 2:46 ` [PATCH 1/3] Move x86_64 idle notifiers to generic Todd Poynor
2011-06-28 2:46 ` [PATCH 2/3] ARM: Call idle notifiers Todd Poynor
2011-07-07 17:08 ` Kevin Hilman [this message]
2011-07-11 19:50 ` Frederic Weisbecker
2011-07-13 22:53 ` Todd Poynor
2011-06-28 2:46 ` [PATCH 3/3] ARM: Move leds idle start/stop calls to " Todd Poynor
2011-06-28 9:02 ` [PATCH 0/3] Add generic " Bryan Wu
2011-06-28 18:28 ` Nicolas Pitre
2011-06-28 18:25 ` Nicolas Pitre
2011-07-07 17:05 ` Kevin Hilman
2011-07-07 20:17 ` Todd Poynor
2011-07-07 22:34 ` Kevin Hilman
2011-07-08 11:13 ` Russell King - ARM Linux
2011-07-11 22:10 ` Todd Poynor
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=874o2ydnmg.fsf@ti.com \
--to=khilman@ti.com \
--cc=hpa@zytor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=toddpoynor@google.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