From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
nm@ti.com, Andrew Lunn <andrew@lunn.ch>,
linaro-kernel@lists.linaro.org,
Jason Cooper <jason@lakedaemon.net>,
linux-pm@vger.kernel.org, sboyd@codeaurora.org,
Rafael Wysocki <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org,
Gregory Clement <gregory.clement@free-electrons.com>,
thomas.petazzoni@free-electrons.com,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 10/10] cpufreq: mvebu: Use generic platdev driver
Date: Mon, 25 Apr 2016 14:53:49 +0200 [thread overview]
Message-ID: <6893237.FoNPbfW3DC@wuerfel> (raw)
In-Reply-To: <20160425030041.GF22726@vireshk-i7>
On Monday 25 April 2016 08:30:41 Viresh Kumar wrote:
> On 23-04-16, 00:42, Arnd Bergmann wrote:
> > On Thursday 21 April 2016 14:29:02 Viresh Kumar wrote:
> > > diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
> > > index 79d0a5d9da8e..f24f46776fbb 100644
> > > --- a/arch/arm/mach-mvebu/pmsu.c
> > > +++ b/arch/arm/mach-mvebu/pmsu.c
> > > @@ -685,8 +685,6 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
> > > dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n",
> > > __func__, ret);
> > > }
> > > -
> > > - platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> > > return 0;
> > > }
> > >
> > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > index 69b2a222c84e..5704a92c52dc 100644
> > > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > @@ -33,6 +33,8 @@ static const struct of_device_id machines[] = {
> > >
> > > { .compatible = "marvell,berlin", },
> > >
> > > + { .compatible = "marvell,armadaxp", },
> > > +
> > > { .compatible = "samsung,exynos3250", },
> > > { .compatible = "samsung,exynos4210", },
> > > { .compatible = "samsung,exynos4212", },
> >
> > I think to make it clear that the ordering is significant here, I would leave this
> > platform_device_register_simple() in armada_xp_pmsu_cpufreq_init().
> >
> > However, it might be helpful to move that function into a new file in
> > drivers/cpufreq/ if that works.
>
> We just can't get wrong with the ordering here, as this is done from
> device_initcall() and so that point is out of question.
I realize that the ordering is fixed through the way that the kernel
is linked, my worry is more about someone changing the code in some
way because it's not obvious from reading the code that the
dependency exists. If either the armada_xp_pmsu_cpufreq_init()
initcall gets changed so it does not always get called, or the
cpufreq_dt_platdev_init() initcall gets changed so it comes a little
earlier, things will break.
> The other thing that can happen is that armada_xp_pmsu_cpufreq_init()
> call can fail. In that case, most of the times cpufreq-dt ->init()
> will fail as well, so even that is fine for me.
>
> And, so I think we can keep this patch as is.
What are the downsides of moving armada_xp_pmsu_cpufreq_init()
into drivers/cpufreq?
Arnd
next prev parent reply other threads:[~2016-04-25 12:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 8:58 [PATCH 00/10] cpufreq: Get rid of cpufreq-dt's platform data Viresh Kumar
2016-04-21 8:58 ` [PATCH 01/10] PM / OPP: Propagate the error returned by _find_opp_table() Viresh Kumar
2016-04-22 22:14 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 02/10] PM / OPP: Add missing doc style comments Viresh Kumar
2016-04-22 22:15 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 03/10] PM / OPP: dev_pm_opp_set_sharing_cpus() doesn't depend on CONFIG_OF Viresh Kumar
2016-04-22 22:16 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 04/10] PM / OPP: Relocate dev_pm_opp_set_sharing_cpus() Viresh Kumar
2016-04-22 22:22 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 05/10] PM / OPP: Mark shared-opp for non-dt case Viresh Kumar
2016-04-22 22:21 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() Viresh Kumar
2016-04-22 22:21 ` Stephen Boyd
2016-04-27 2:59 ` Viresh Kumar
2016-04-21 8:58 ` [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Viresh Kumar
2016-04-22 22:27 ` Stephen Boyd
2016-04-25 9:36 ` Viresh Kumar
2016-04-25 21:45 ` Stephen Boyd
2016-04-25 21:48 ` Rafael J. Wysocki
2016-04-25 21:56 ` Stephen Boyd
2016-04-25 22:03 ` Rafael J. Wysocki
2016-04-21 8:59 ` [PATCH 08/10] mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared Viresh Kumar
2016-04-22 22:24 ` Stephen Boyd
2016-04-21 8:59 ` [PATCH 09/10] cpufreq: dt: Kill platform-data Viresh Kumar
2016-04-22 22:26 ` Stephen Boyd
2016-04-21 8:59 ` [PATCH 10/10] cpufreq: mvebu: Use generic platdev driver Viresh Kumar
2016-04-22 22:42 ` Arnd Bergmann
2016-04-25 3:00 ` Viresh Kumar
2016-04-25 12:53 ` Arnd Bergmann [this message]
2016-04-25 12:56 ` Viresh Kumar
2016-04-25 15:26 ` Arnd Bergmann
2016-04-25 15:29 ` Viresh Kumar
2016-04-25 15:46 ` Arnd Bergmann
2016-04-25 15:55 ` Thomas Petazzoni
2016-04-21 20:10 ` [PATCH 00/10] cpufreq: Get rid of cpufreq-dt's platform data Rafael J. Wysocki
2016-04-22 3:16 ` [PATCH] PM / OPP: -ENOSYS is applicable only to syscalls Viresh Kumar
2016-04-22 12:42 ` Rafael J. Wysocki
2016-04-22 14:59 ` One Thousand Gnomes
2016-04-27 2:47 ` Viresh Kumar
2016-04-22 22:44 ` [PATCH 00/10] cpufreq: Get rid of cpufreq-dt's platform data Arnd Bergmann
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=6893237.FoNPbfW3DC@wuerfel \
--to=arnd@arndb.de \
--cc=andrew@lunn.ch \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--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=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=viresh.kumar@linaro.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).