[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190130102042.uwxpsep5vmeq4h62@queper01-lin>
Date: Wed, 30 Jan 2019 10:20:45 +0000
From: Quentin Perret <quentin.perret@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Matthias Kaehlcke <mka@...omium.org>, rjw@...ysocki.net,
sudeep.holla@....com, liviu.dudau@....com,
lorenzo.pieralisi@....com, robh+dt@...nel.org,
mark.rutland@....com, nm@...com, sboyd@...nel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
dietmar.eggemann@....com
Subject: Re: [PATCH 2/7] cpufreq: dt: Register an Energy Model
On Wednesday 30 Jan 2019 at 15:47:15 (+0530), Viresh Kumar wrote:
> On 30-01-19, 09:12, Quentin Perret wrote:
> > What I had in mind is something as simple as:
> >
> > void of_dev_pm_opp_register_em(struct cpumask *cpus)
> > {
> > /* Bail out if an EM is there */
> > if (em_cpu_get(cpumask_first(cpus)))
> > return;
> >
> > /* Check prerequisites: dpc coeff in DT, ... */
> > ...
> >
> > em_register_perf_domain(...);
> > }
> >
> > IIUC, Matthias' point was that if the EM is already registered, there is
> > no good reason to call em_register_perf_domain() again. Now, that should
> > in fact be harmless because em_register_perf_domain() already does that
> > check. It's just cleaner and easier to understand from a conceptual
> > standpoint to not call that function several times for no reason I
> > assume.
>
> If there is no good reason to call em_register_perf_domain() several
> times, then the same applies to of_dev_pm_opp_register_em() as well,
> isn't it ?
Hrmpf, that is true ... :-)
> This is init code anyway isn't going to run a lot, so I wouldn't
> suggest adding any such (duplicate) checks in
> of_dev_pm_opp_register_em().
Fair enough, I'll post a v2 w/o the check and we'll see if others have
complaints.
Thanks,
Quentin
Powered by blists - more mailing lists