linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] opp: Don't create an OPP table from dev_pm_opp_get_opp_table()
Date: Fri, 6 Nov 2020 16:18:19 +0300	[thread overview]
Message-ID: <ec9839dd-5d2d-0d6b-6563-b14da4af1a57@gmail.com> (raw)
In-Reply-To: <1012a98950355bd5a52424668050a17c3430cbe0.1604643714.git.viresh.kumar@linaro.org>

06.11.2020 09:24, Viresh Kumar пишет:
> It has been found that some users (like cpufreq-dt and others on LKML)
> have abused the helper dev_pm_opp_get_opp_table() to create the OPP
> table instead of just finding it, which is the wrong thing to do. This
> routine was meant for OPP core's internal working and exposed the whole
> functionality by mistake.
> 
> Change the scope of dev_pm_opp_get_opp_table() to only finding the
> table. The internal helpers _opp_get_opp_table*() are thus renamed to
> _add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we
> don't need the index field for finding the OPP table) and so the only
> user, genpd, is updated.
> 
> Note that the prototype of _add_opp_table() was already left in opp.h by
> mistake when it was removed earlier and so we weren't required to add it
> now.

Hello Viresh,

It looks like this is not an entirely correct change because previously
it was possible to get an empty opp_table in order to use it for the
dev_pm_opp_set_rate(), which would fall back to clk_set_rate if table is
empty.

Now it's not possible to get an empty table and
dev_pm_opp_of_add_table() would error out if OPPs are missing in a
device-tree. Hence it's not possible to implement a fall back without
abusing opp_set_regulators() or opp_set_supported_hw() for getting the
empty table. Or am I missing something?

  parent reply	other threads:[~2020-11-06 13:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  6:24 [PATCH 1/2] cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table Viresh Kumar
2020-11-06  6:24 ` [PATCH 2/2] opp: Don't create an OPP table from dev_pm_opp_get_opp_table() Viresh Kumar
2020-11-06 10:25   ` Ulf Hansson
2020-11-06 13:18   ` Dmitry Osipenko [this message]
2020-11-09  4:34     ` Viresh Kumar
2020-11-09  4:41       ` Dmitry Osipenko
2020-11-09  4:57         ` Viresh Kumar
2020-11-09  5:29           ` Dmitry Osipenko
     [not found] ` <CGME20201109124218eucas1p1b8948a9bf2cf107b17b500b1603905e8@eucas1p1.samsung.com>
2020-11-09 12:42   ` [PATCH 1/2] cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table Marek Szyprowski
2020-11-10  6:00     ` Viresh Kumar
2020-11-10  6:57       ` Marek Szyprowski
2020-11-10  6:59         ` Viresh Kumar

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=ec9839dd-5d2d-0d6b-6563-b14da4af1a57@gmail.com \
    --to=digetx@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.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).