linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>,
	Amit Daniel Kachhap <amit.daniel@samsung.com>
Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table
Date: Mon, 5 May 2014 08:38:55 -0500	[thread overview]
Message-ID: <5367946F.1030407@ti.com> (raw)
In-Reply-To: <CAKohpon7W726Hxj5OJ6SnmPz3gYhAeBRr1wS3SCa3F2hSLriLQ@mail.gmail.com>

On 05/05/2014 12:54 AM, Viresh Kumar wrote:
> On 3 May 2014 05:46, Jonghwan Choi <jhbird.choi@samsung.com> wrote:
>> Hi. Viresh Kumar
>> Your reply is so fast like Usain Bolt.
> 
> Heh, that's not true.. See how slow I was this time :)
> 
>>> So, create three flags:
>>> OPP_TABLE_ORDER_ASCENDING              0
>>> OPP_TABLE_ORDER_DESCENDING            1
>>> OPP_TABLE_ORDER_ORIGINAL                  2 (And use this for your case.)
>>
>> -> Actually, I want to use OPP_TABLE_ORDER_DESCENDING.(Not
>> OPP_TABLE_ORDER_ORIGINAL.)
>> I think that it is enough to support both descending and ascending ordering
>> only.
>> The meaning of "ORIGIANL" Amit, said, when he(and I) writes a frequency in
>> dts file with ordering(Ascending or Descending). He(and I) want the
>> frequency to be register according to ordering.(Ascending or Descending).
> 
> But what if somebody doesn't have a ascending or descending list there? And
> want to preserve the original list? That's why I recommended it.
> 
>> I concerned that if we use ORIGINAL ordering, opp_find_freq_ceil/foor can be
>> broken.
> 
> I completely missed that earlier :) ..
> It would be broken with descending one as well..
> 
> To skip the complexity of finding right freq associated with
> "ORIGINAL" ordering,
> lets concentrate on Ascending/Descending ordering for now.
> 
> So, this is what I would recommend now:
> - Create two macros: OPP_TABLE_ORDER_ASCENDING and
>   OPP_TABLE_ORDER_DESCENDING
> - create of_init_opp_table_ordered(**, int order), order would be one of the
> above two macros
> - rename dev_pm_opp_add to __dev_pm_opp_add() and create a wrapper
> over it: dev_pm_opp_add(), which would pass
> OPP_TABLE_ORDER_ASCENDING to it by default and call it from
> of_init_opp_table_ordered() like this: __dev_pm_opp_add(***, order)..
> 
> - Fix ceil/floor routines for these two cases.

With the brief history of the patch in linux-pm, I am unable to
understand why not just use ceil/floor routines to pick up data the
way you need it. It should not matter if we use an ordered list, or
some other weird organization inside the storage. There are already
accessors functions meant to precisely help with the case that is
being tried here.


-- 
Regards,
Nishanth Menon

  reply	other threads:[~2014-05-05 13:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30  6:28 [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table Jonghwan Choi
2014-04-30  8:25 ` Viresh Kumar
2014-05-03  0:16   ` Jonghwan Choi
2014-05-05  5:54     ` Viresh Kumar
2014-05-05 13:38       ` Nishanth Menon [this message]
2014-05-05 14:14         ` Viresh Kumar
2014-05-05 14:23           ` Nishanth Menon
2014-05-05 14:38             ` Viresh Kumar
2014-05-05 14:46               ` Nishanth Menon
2014-05-06 23:43               ` Jonghwan Choi
2014-05-07  1:00                 ` Nishanth Menon
2014-05-07  6:04                   ` Viresh Kumar
2014-05-08  1:22                     ` Jonghwan Choi
2014-05-08  1:55                       ` Nishanth Menon
2014-05-08  2:07                         ` Jonghwan Choi
2014-05-08  5:55                           ` Viresh Kumar
2014-05-09  1:09                             ` Jonghwan Choi
2014-05-09  6:00                               ` Viresh Kumar
2014-05-09 11:59                                 ` jonghwan Choi
2014-05-09 13:23                                   ` Nishanth Menon
2014-05-11 11:38                                     ` jonghwan Choi
2014-05-12  6:18                                       ` Viresh Kumar
2014-05-08  5:50                         ` Viresh Kumar
2014-05-06 17:25           ` Sudeep Holla

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=5367946F.1030407@ti.com \
    --to=nm@ti.com \
    --cc=amit.daniel@samsung.com \
    --cc=jhbird.choi@samsung.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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).