From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"lina.iyer@linaro.org" <lina.iyer@linaro.org>
Subject: Re: [PATCH 4/6] ARM64: cpuidle: Rename cpu_init_idle to a common function name
Date: Sun, 15 Mar 2015 16:26:08 +0000 [thread overview]
Message-ID: <20150315162608.GA21176@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <20150314114109.GB9696@e104818-lin.cambridge.arm.com>
On Sat, Mar 14, 2015 at 11:41:09AM +0000, Catalin Marinas wrote:
> On Fri, Mar 13, 2015 at 06:22:46PM +0000, Catalin Marinas wrote:
> > On Tue, Mar 03, 2015 at 01:29:35PM +0100, Daniel Lezcano wrote:
> > > diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
> > > index 0cea244..6ef291c7 100644
> > > --- a/drivers/cpuidle/cpuidle-arm64.c
> > > +++ b/drivers/cpuidle/cpuidle-arm64.c
> > > @@ -110,7 +110,7 @@ static int __init arm64_idle_init(void)
> > > * idle states suspend back-end specific data
> > > */
> > > for_each_possible_cpu(cpu) {
> > > - ret = cpu_init_idle(cpu);
> > > + ret = arm_cpuidle_init(cpu);
> >
> > Same nitpick here about dropping the arm_ prefix (though here we already
> > have a cpuidle_init).
>
> Actually, a question, probably for Lorenzo - why do we need to call
> cpu_init_idle() from the driver? Is there any dependency on what the
> driver had done before this call? If not, I suggest a core_initcall() in
> the arch code for cpu_init_idle(). At a quick look through the code, the
> back-end can be initialised on its own.
Because we want to register the driver if and only if both the generic
idle states parsing AND the back-end initialization succeed. If we move
the cpu_init_idle() to a core initcall() we still need a way to probe
if the back end initialization succeeded or not, we do not want to
have a driver initialized with back-end calls that fail.
It is also so, because we must guarantee the idle index mapping between
generic driver and the back end, if either initialization fails, the
driver should not be registered.
At the moment the driver is very similar to the x86 generic driver,
which is a good thing for consistency; by the way x86 driver prefixes
the function names with "intel_", I am not too fussed about the
functions naming scheme, open to suggestions.
Lorenzo
next prev parent reply other threads:[~2015-03-15 16:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 12:29 [PATCH 0/6] ARM: cpuidle: Unify the ARM64/ARM DT approach Daniel Lezcano
2015-03-03 12:29 ` [PATCH 1/6] ARM: cpuidle: Remove duplicate header inclusion Daniel Lezcano
2015-03-13 17:54 ` Lorenzo Pieralisi
2015-03-03 12:29 ` [PATCH 2/6] ARM: cpuidle: Add a cpuidle ops structure to be used for DT Daniel Lezcano
2015-03-16 18:16 ` Lorenzo Pieralisi
2015-03-17 11:01 ` Daniel Lezcano
2015-03-16 22:08 ` Stephen Boyd
2015-03-17 11:29 ` Lorenzo Pieralisi
2015-03-18 1:14 ` Stephen Boyd
2015-03-18 8:13 ` Daniel Lezcano
2015-03-20 17:23 ` Catalin Marinas
2015-03-03 12:29 ` [PATCH 3/6] ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function Daniel Lezcano
2015-03-13 18:21 ` Catalin Marinas
2015-03-13 21:22 ` Daniel Lezcano
[not found] ` <1425385777-14766-1-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-03-03 12:29 ` [PATCH 4/6] ARM64: cpuidle: Rename cpu_init_idle to a common function name Daniel Lezcano
[not found] ` <1425385777-14766-5-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-03-13 18:22 ` Catalin Marinas
2015-03-14 11:41 ` Catalin Marinas
2015-03-15 16:26 ` Lorenzo Pieralisi [this message]
2015-03-20 16:01 ` Daniel Lezcano
2015-03-20 17:26 ` Catalin Marinas
2015-03-03 12:29 ` [PATCH 6/6] ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64 Daniel Lezcano
2015-03-12 14:25 ` [PATCH 0/6] ARM: cpuidle: Unify the ARM64/ARM DT approach Daniel Lezcano
2015-03-13 18:29 ` Catalin Marinas
2015-03-13 21:26 ` Daniel Lezcano
2015-03-13 20:51 ` Rob Herring
2015-03-13 21:31 ` Daniel Lezcano
2015-03-15 16:48 ` Lorenzo Pieralisi
2015-03-03 12:29 ` [PATCH 5/6] ARM64: cpuidle: Remove arm64 reference Daniel Lezcano
2015-03-13 17:03 ` [PATCH 0/6] ARM: cpuidle: Unify the ARM64/ARM DT approach Kevin Hilman
2015-03-13 17:08 ` Daniel Lezcano
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=20150315162608.GA21176@e102568-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=lina.iyer@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).