linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "ego@linux.vnet.ibm.com" <ego@linux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>
Subject: Re: [PATCH] cpufreq: don't print value of .driver_data from core
Date: Thu, 27 Mar 2014 16:56:03 +0530	[thread overview]
Message-ID: <20140327112602.GD27777@in.ibm.com> (raw)
In-Reply-To: <CAKohpombz9jzAs-_mpBNJyTJrrvvXVQ1L0V8fyKmB1vXpSPjmQ@mail.gmail.com>

On Thu, Mar 27, 2014 at 04:29:37PM +0530, Viresh Kumar wrote:
> On 27 March 2014 16:18, Gautham R Shenoy <ego@linux.vnet.ibm.com> wrote:
> > So after this patch, driver_data is only going to be used by drivers
> > which want an "unsigned int" value to be saved along with the
> > frequency in the frequency_table and for those who want to overload
> > its interpretation to indicate BOOST.
> >
> > From the core's stand point, it is useful only for determining whether
> > a frequency is BOOST frequency or not.
> 
> Yes.
> 
> > So, wouldn't it be logical to allow drivers maintain their own driver
> > data since the core is anyway not interested in it, and change this
> > .driver_data to "flags" or some such which can indicate boost ?
> 
> We can add another field .flags in case Rafael doesn't accept the
> other proposal I sent for fixing BOOST issue.

Even with that patch, the .driver_data won't be opaque. And that's not
good. Because, while some driver might not be explicitly setting the
value of .driver_data to 0xABABABAB, it might want to store the value
obtained at runtime into this field. And it could so happen
that at runtime this value is 0xABABABAB.

> 
> But the point behind keeping .driver_data field here was: many drivers
> have some information attached to each frequency and they are closely
> bound to each other. And so it made more sense to keep them together.
> This is still used by many drivers and I wouldn't like them to maintain
> separate arrays for keeping this information. They are so much bound
> to the frequencies at the same index, that keeping them separately
> wouldn't be a good idea.

I understand this part. However there might be more data than an
"unsigned int" that the drivers would like to be bound at the same
index. Voltage information, for instance.

> 
--
Thanks and Regards
gautham.


  reply	other threads:[~2014-03-27 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 10:07 [PATCH] cpufreq: don't print value of .driver_data from core Viresh Kumar
2014-03-27 10:19 ` Srivatsa S. Bhat
2014-03-27 10:48 ` Gautham R Shenoy
2014-03-27 10:59   ` Viresh Kumar
2014-03-27 11:26     ` Gautham R Shenoy [this message]
2014-03-28  8:00       ` Lukasz Majewski

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=20140327112602.GD27777@in.ibm.com \
    --to=ego@linux.vnet.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=rjw@rjwysocki.net \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=svaidy@linux.vnet.ibm.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).