From: "Menon, Nishanth" <nm@ti.com>
To: "Gopinath, Thara" <thara@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Kevin Hilman <khilman@deeprootsystems.com>,
"Kristo Tero (Nokia-D/Tampere)" <Tero.Kristo@nokia.com>
Subject: Re: [PATCH] PM-WIP-OPP: Fixing wrong target level being passed during Core DVFS.
Date: Thu, 18 Feb 2010 16:58:21 +0200 [thread overview]
Message-ID: <4B7D558D.7000101@ti.com> (raw)
In-Reply-To: <1266481866-10875-1-git-send-email-thara@ti.com>
Gopinath, Thara said the following on 02/18/2010 10:31 AM:
> As per the current implementaion (u8*)&target_level is being passed
> to freq_to_opp in set_opp. This would result in updating just the first
> 8 bits of a u32 variable. Later target_level is passed to
> resource_set_opp_level as a u32 parameter. This maens
> a. Initially target_level was 0xabcdefgh.
> b. freq_to_opp updates the lower eight bits of target_level
> to 0xXX. Now target_level = 0xabcdefXX.
> c. We pass 0xabcdefXX as target_level to resource_set_opp_level
> when we want to pass just 0xXX.
> This is leading to some corrupted bookkeeping later on in the
> dvfs path.
>
> This patch ensures that target_level passed to resource_set_opp_level
> is actually the level that is intended by freq_to_opp API.
Thanks.. good catch.
[PATCH] PM-WIP-OPP: Fixing wrong target level being passed during Core
DVFS.
Suggestion on the subject:
could you put it something like the following so that git-am will
throw away PM-WIP-OPP?
[PATCH] [PM-WIP-OPP] omap3: pm: Fix wrong target level during core dvfs
?
Some suggestion below.
>
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/resource34xx.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
> index 3604a38..d2336d8 100644
> --- a/arch/arm/mach-omap2/resource34xx.c
> +++ b/arch/arm/mach-omap2/resource34xx.c
> @@ -463,6 +463,7 @@ int set_opp(struct shared_resource *resp, u32 target_level)
> } else if (resp == vdd2_resp) {
> unsigned long req_l3_freq;
> struct omap_opp *oppx = NULL;
> + u8 opp;
>
> /* Convert the tput in KiB/s to Bus frequency in MHz */
> req_l3_freq = (target_level * 1000)/4;
> @@ -478,10 +479,11 @@ int set_opp(struct shared_resource *resp, u32 target_level)
> /* uh uh.. no OPPs?? */
> BUG_ON(IS_ERR(oppx));
>
If you do target_level = 0; here, the entire patch is a oneliner :)
> - ret = freq_to_opp((u8 *)&target_level, OPP_L3, req_l3_freq);
> + ret = freq_to_opp(&opp, OPP_L3, req_l3_freq);
> /* we dont expect this to fail */
> BUG_ON(ret);
>
> + target_level = opp;
> ret = resource_set_opp_level(VDD2_OPP, target_level, 0);
> }
> return 0;
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2010-02-18 14:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 8:31 [PATCH] PM-WIP-OPP: Fixing wrong target level being passed during Core DVFS Thara Gopinath
2010-02-18 14:58 ` Menon, Nishanth [this message]
2010-02-23 5:28 ` Aguirre, Sergio
2010-02-23 5:31 ` Menon, Nishanth
2010-02-23 12:42 ` Aguirre, Sergio
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=4B7D558D.7000101@ti.com \
--to=nm@ti.com \
--cc=Tero.Kristo@nokia.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=thara@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