All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Menon, Nishanth" <nm@ti.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>,
	l-o <linux-omap@vger.kernel.org>,
	l-a <linux-arm-kernel@lists.infradead.org>,
	Paul <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] power: introduce library for device-specific OPPs
Date: Thu, 07 Oct 2010 15:13:37 -0700	[thread overview]
Message-ID: <87fwwh7isu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C014F748B07@dlee02.ent.ti.com> (Nishanth Menon's message of "Thu, 7 Oct 2010 17:03:20 -0500")

"Menon, Nishanth" <nm@ti.com> writes:

>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>> Sent: Thursday, October 07, 2010 4:55 PM
>
>
>> 
>> Hi,
>> 
>> On Wednesday, October 06, 2010, Nishanth Menon wrote:
>> > SoCs have a standard set of tuples consisting of frequency and
>> > voltage pairs that the device will support per voltage domain. These
>> > are called Operating Performance Points or OPPs. The actual
>> > definitions of OPP varies over silicon versions. For a specific domain,
>> > we can have a set of {frequency, voltage} pairs. As the kernel boots
>> > and more information is available, a default set of these are activated
>> > based on the precise nature of device. Further on operation, based on
>> > conditions prevailing in the system (such as temperature), some OPP
>> > availability may be temporarily controlled by the SoC frameworks.
>> >
>> > To implement an OPP, some sort of power management support is necessary
>> > hence this library depends on CONFIG_PM.
>> 
>> The patch generally looks good to me, I only have a couple of cosmetic
> Thanks for the great reviews.. It did bump up the resultant patch.
>
>> remarks
>> (below).
>> 
>> ...
>> > +static int opp_set_availability(struct device *dev, unsigned long freq,
>> > +		bool availability_req)
>> > +{
>> > +	struct device_opp *tmp_dev_opp, *dev_opp = NULL;
>> > +	struct opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
>> > +	int r = 0;
>> > +
>> > +	/* keep the node allocated */
>> > +	new_opp = kmalloc(sizeof(struct opp), GFP_KERNEL);
>> > +	if (!new_opp) {
>> > +		pr_warning("Unable to allocate opp\n");
>> 
>> Please add an identification string to the messages, something like
>> "OPP: Unable to allocat object\n" (and similarly in the other messages).
>> That would help to find the source of a message in case there's any
>> problem.
>
> pr_fmt has been reformatted for this. The actual message which will appear
> is as follows:
> opp_set_availability: Unable to allocate opp
>
> is'nt that good enough considering that all functions are opp_ prefixed? 
> I can modify pr_fmt to add "OPP:" but I kinda think it is redundant. But I
> have no strong opinions on that and look forward to your recommendations.

Even more informative would be to use dev_warn() and include the func.
That way we'll even know which device has the problem.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] power: introduce library for device-specific OPPs
Date: Thu, 07 Oct 2010 15:13:37 -0700	[thread overview]
Message-ID: <87fwwh7isu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C014F748B07@dlee02.ent.ti.com> (Nishanth Menon's message of "Thu, 7 Oct 2010 17:03:20 -0500")

"Menon, Nishanth" <nm@ti.com> writes:

>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw at sisk.pl]
>> Sent: Thursday, October 07, 2010 4:55 PM
>
>
>> 
>> Hi,
>> 
>> On Wednesday, October 06, 2010, Nishanth Menon wrote:
>> > SoCs have a standard set of tuples consisting of frequency and
>> > voltage pairs that the device will support per voltage domain. These
>> > are called Operating Performance Points or OPPs. The actual
>> > definitions of OPP varies over silicon versions. For a specific domain,
>> > we can have a set of {frequency, voltage} pairs. As the kernel boots
>> > and more information is available, a default set of these are activated
>> > based on the precise nature of device. Further on operation, based on
>> > conditions prevailing in the system (such as temperature), some OPP
>> > availability may be temporarily controlled by the SoC frameworks.
>> >
>> > To implement an OPP, some sort of power management support is necessary
>> > hence this library depends on CONFIG_PM.
>> 
>> The patch generally looks good to me, I only have a couple of cosmetic
> Thanks for the great reviews.. It did bump up the resultant patch.
>
>> remarks
>> (below).
>> 
>> ...
>> > +static int opp_set_availability(struct device *dev, unsigned long freq,
>> > +		bool availability_req)
>> > +{
>> > +	struct device_opp *tmp_dev_opp, *dev_opp = NULL;
>> > +	struct opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
>> > +	int r = 0;
>> > +
>> > +	/* keep the node allocated */
>> > +	new_opp = kmalloc(sizeof(struct opp), GFP_KERNEL);
>> > +	if (!new_opp) {
>> > +		pr_warning("Unable to allocate opp\n");
>> 
>> Please add an identification string to the messages, something like
>> "OPP: Unable to allocat object\n" (and similarly in the other messages).
>> That would help to find the source of a message in case there's any
>> problem.
>
> pr_fmt has been reformatted for this. The actual message which will appear
> is as follows:
> opp_set_availability: Unable to allocate opp
>
> is'nt that good enough considering that all functions are opp_ prefixed? 
> I can modify pr_fmt to add "OPP:" but I kinda think it is redundant. But I
> have no strong opinions on that and look forward to your recommendations.

Even more informative would be to use dev_warn() and include the func.
That way we'll even know which device has the problem.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Menon\, Nishanth" <nm@ti.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>,
	l-o <linux-omap@vger.kernel.org>,
	l-a <linux-arm-kernel@lists.infradead.org>,
	Paul <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] power: introduce library for device-specific OPPs
Date: Thu, 07 Oct 2010 15:13:37 -0700	[thread overview]
Message-ID: <87fwwh7isu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C014F748B07@dlee02.ent.ti.com> (Nishanth Menon's message of "Thu, 7 Oct 2010 17:03:20 -0500")

"Menon, Nishanth" <nm@ti.com> writes:

>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>> Sent: Thursday, October 07, 2010 4:55 PM
>
>
>> 
>> Hi,
>> 
>> On Wednesday, October 06, 2010, Nishanth Menon wrote:
>> > SoCs have a standard set of tuples consisting of frequency and
>> > voltage pairs that the device will support per voltage domain. These
>> > are called Operating Performance Points or OPPs. The actual
>> > definitions of OPP varies over silicon versions. For a specific domain,
>> > we can have a set of {frequency, voltage} pairs. As the kernel boots
>> > and more information is available, a default set of these are activated
>> > based on the precise nature of device. Further on operation, based on
>> > conditions prevailing in the system (such as temperature), some OPP
>> > availability may be temporarily controlled by the SoC frameworks.
>> >
>> > To implement an OPP, some sort of power management support is necessary
>> > hence this library depends on CONFIG_PM.
>> 
>> The patch generally looks good to me, I only have a couple of cosmetic
> Thanks for the great reviews.. It did bump up the resultant patch.
>
>> remarks
>> (below).
>> 
>> ...
>> > +static int opp_set_availability(struct device *dev, unsigned long freq,
>> > +		bool availability_req)
>> > +{
>> > +	struct device_opp *tmp_dev_opp, *dev_opp = NULL;
>> > +	struct opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
>> > +	int r = 0;
>> > +
>> > +	/* keep the node allocated */
>> > +	new_opp = kmalloc(sizeof(struct opp), GFP_KERNEL);
>> > +	if (!new_opp) {
>> > +		pr_warning("Unable to allocate opp\n");
>> 
>> Please add an identification string to the messages, something like
>> "OPP: Unable to allocat object\n" (and similarly in the other messages).
>> That would help to find the source of a message in case there's any
>> problem.
>
> pr_fmt has been reformatted for this. The actual message which will appear
> is as follows:
> opp_set_availability: Unable to allocate opp
>
> is'nt that good enough considering that all functions are opp_ prefixed? 
> I can modify pr_fmt to add "OPP:" but I kinda think it is redundant. But I
> have no strong opinions on that and look forward to your recommendations.

Even more informative would be to use dev_warn() and include the func.
That way we'll even know which device has the problem.

Kevin

  reply	other threads:[~2010-10-07 22:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06  9:26 [PATCH] power: introduce library for device-specific OPPs Nishanth Menon
2010-10-06  9:26 ` Nishanth Menon
2010-10-07 21:54 ` Rafael J. Wysocki
2010-10-07 21:54   ` Rafael J. Wysocki
2010-10-07 22:03   ` Menon, Nishanth
2010-10-07 22:03     ` Menon, Nishanth
2010-10-07 22:03     ` Menon, Nishanth
2010-10-07 22:13     ` Kevin Hilman [this message]
2010-10-07 22:13       ` Kevin Hilman
2010-10-07 22:13       ` Kevin Hilman
2010-10-07 22:15       ` Menon, Nishanth
2010-10-07 22:15         ` Menon, Nishanth
2010-10-07 22:15         ` Menon, Nishanth
2010-10-07 22:15       ` Menon, Nishanth
2010-10-07 22:13     ` Kevin Hilman
2010-10-07 22:03   ` Menon, Nishanth
2010-10-07 21:54 ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2010-10-06  9:26 Nishanth Menon

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=87fwwh7isu.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nm@ti.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.