linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@google.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>, Kevin <khilman@ti.com>
Subject: Re: [PM-WIP_CPUFREQ][PATCH V3 4/8] OMAP2+: cpufreq: dont support !freq_table
Date: Wed, 25 May 2011 17:51:05 -0700	[thread overview]
Message-ID: <20110526005105.GA21212@google.com> (raw)
In-Reply-To: <1306366733-8439-5-git-send-email-nm@ti.com>

On Wed, May 25, 2011 at 04:38:49PM -0700, Nishanth Menon wrote:
> OMAP2+ all have frequency tables, hence the hacks we had for older
> silicon do not need to be carried forward. As part of this change,
> use cpufreq_frequency_table_target to find the best match for
> frequency requested.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
...
> @@ -79,22 +66,35 @@ static int omap_target(struct cpufreq_policy *policy,
>  		       unsigned int target_freq,
>  		       unsigned int relation)
>  {
> -	int i, ret = 0;
> +	unsigned int i;
> +	int ret = 0;
>  	struct cpufreq_freqs freqs;
>  
>  	/* Changes not allowed until all CPUs are online */
>  	if (is_smp() && (num_online_cpus() < NR_CPUS))
>  		return ret;
>  
> -	/* Ensure desired rate is within allowed range.  Some govenors
> -	 * (ondemand) will just pass target_freq=0 to get the minimum. */
> -	if (target_freq < policy->min)
> -		target_freq = policy->min;
> -	if (target_freq > policy->max)
> -		target_freq = policy->max;
> +	if (!freq_table) {
> +		dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__,
> +				policy->cpu);

Just a minor comment: suggest dev_dbg() or WARN_ONCE() for some of
these conditions that may be frequently evaluated and probably won't
be cleared up after being hit once.

...

Todd

  reply	other threads:[~2011-05-26  0:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25 23:38 [PM-WIP_CPUFREQ][PATCH 0/6 V3] Cleanups for cpufreq Nishanth Menon
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 1/8] OMAP2+: cpufreq: move clk name decision to init Nishanth Menon
2011-05-26 17:33   ` Kevin Hilman
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 2/8] OMAP2+: cpufreq: deny initialization if no mpudev Nishanth Menon
2011-05-26 17:34   ` Kevin Hilman
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 3/8] OMAP2+: cpufreq: use opp/clk_*cpufreq_table based on silicon Nishanth Menon
2011-05-26 17:38   ` Kevin Hilman
2011-05-26 18:35     ` Menon, Nishanth
2011-05-26 18:39       ` Menon, Nishanth
2011-05-26 20:25         ` Kevin Hilman
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 4/8] OMAP2+: cpufreq: dont support !freq_table Nishanth Menon
2011-05-26  0:51   ` Todd Poynor [this message]
2011-05-26  0:53     ` Menon, Nishanth
     [not found]     ` <SNT104-W336E0DDFB034FA635C328BBA770@phx.gbl>
2011-05-26  1:03       ` Menon, Nishanth
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 5/8] OMAP2+: cpufreq: fix invalid cpufreq table with central alloc/free Nishanth Menon
2011-05-26  1:09   ` Todd Poynor
2011-05-26  1:21     ` Menon, Nishanth
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 6/8] OMAP2+: cpufreq: fix freq_table leak Nishanth Menon
2011-05-26  0:16   ` Kevin Hilman
2011-05-26  0:47     ` Menon, Nishanth
2011-05-26 17:11       ` Kevin Hilman
2011-05-26 18:34         ` Menon, Nishanth
2011-05-26  1:25   ` Todd Poynor
2011-05-26  1:36     ` Menon, Nishanth
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 7/8] OMAP2+: cpufreq: put clk if cpu_init failed Nishanth Menon
2011-05-25 23:38 ` [PM-WIP_CPUFREQ][PATCH V3 8/8] OMAP: cpufreq: minor file header updates Nishanth Menon
2011-05-26  0:18   ` Kevin Hilman
2011-05-26  0:48     ` Menon, Nishanth
2011-05-26 18:15   ` Kevin Hilman
2011-05-26 18:10 ` [PM-WIP_CPUFREQ][PATCH 0/6 V3] Cleanups for cpufreq Kevin Hilman
2011-05-26 18:36   ` Menon, Nishanth
2011-05-27  5:06   ` Santosh Shilimkar
2011-05-27  6:07     ` Menon, Nishanth
2011-05-27  6:26       ` Santosh Shilimkar
2011-05-27 15:33         ` Turquette, Mike
2011-05-27 23:27           ` Kevin Hilman
2011-05-29 17:25             ` Menon, Nishanth

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=20110526005105.GA21212@google.com \
    --to=toddpoynor@google.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    /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).