From: Nishanth Menon <nm@ti.com>
To: "felipe.balbi@nokia.com" <felipe.balbi@nokia.com>
Cc: Linux-Omap <linux-omap@vger.kernel.org>,
"K, Ambresh" <ambresh@ti.com>,
"Cousson, Benoit" <b-cousson@ti.com>,
"Valentin Eduardo (Nokia-D/Helsinki)"
<eduardo.valentin@nokia.com>,
Kevin Hilman <khilman@deeprootsystems.com>,
"Carmody Phil.2 (EXT-Ixonos/Helsinki)"
<ext-phil.2.carmody@nokia.com>, "Premi, Sanjeev" <premi@ti.com>,
"Kristo Tero (Nokia-D/Tampere)" <Tero.Kristo@nokia.com>,
"Gopinath, Thara" <thara@ti.com>
Subject: Re: [PM-WIP-OPP][PATCH 4/4] omap3: srf: remove hardcoded opp dependency
Date: Fri, 19 Mar 2010 10:36:45 -0500 [thread overview]
Message-ID: <4BA39A0D.5070909@ti.com> (raw)
In-Reply-To: <20100319144747.GV18995@nokia.com>
Felipe Balbi had written, on 03/19/2010 09:47 AM, the following:
> On Thu, Mar 18, 2010 at 07:44:51PM +0100, ext Nishanth Menon wrote:
>> @@ -131,5 +133,16 @@ void __init omap3_pm_init_opp_table(void)
>> r |= opp_init_list(OPP_L3, omap3_opp_def_list[1]);
>> r |= opp_init_list(OPP_DSP, omap3_opp_def_list[2]);
>> BUG_ON(r);
>> +
>> + /* First get the l3 thresh from highest l3 opp */
>> + freq = ULONG_MAX;
>> + opp = opp_find_freq_floor(OPP_L3, &freq);
>> + l3_thresh = freq * 4 / 1000;
>> + /* Now setup the L3 bandwidth restrictions for right mpu freqs */
>> + freq = cpu_is_omap3630() ? 500000000 : 600000000;
>
> I also don't like this. Don't you have somewhere else you could pick ?
yeah..:) I was hoping someone would comment on it. for multiple reasons
why i dont like this, but did put it in as a seperate api call - but I
did not like adding an API call when there is no reason to do that.
a) Essentially the opp bandwidth limit is specific to each cpu - but the
bandwidth itself is more of a resourceframework implementation - this
is the cause of my dislike.
b) if someone were to do an opp_add to l3, the logic I added is crappy!
ok, I think the code that adds l3 should also ensure to re-store new
bandwidth data.. (but anyways opp layer's next limitation comes here ->
lack of a callback mechanism to trigger re-computation etc..).. but that
is another topic..
I am not entirely sure where to put this registration if not here.. in a
module independent manner.
>
>> + while (!IS_ERR(opp = opp_find_freq_ceil(OPP_MPU, &freq))) {
>> + opp_store_data(opp, "l3thresh", (void *) l3_thresh);
>> + freq++;
>> + }
>
> this is a good example of what I mean. Instead of saving l3_thresh, why
> don't you group all those data in a structure (which could even be
> defined per-cpu really, you already have cpufreq34xx, so you could have
> cpufreq24xx 36xx 44xx, etc) and just store that in a void * ??
>
exactly the reason as pointed out in my reply to your email - it is not
flexible enough to do it as SR and similar modules would be common
drivers for all silicon - so u'd restrict their implementation by having
a common structure :).
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2010-03-19 15:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 18:44 [PM-WIP-OPP][PATCH 0/4] few opp layer cleanups Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 1/4] omap3: pm: cpufreq: BUG_ON cleanup Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 2/4] omap: pm: opp: twl: use DIV_ROUND_UP Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 3/4] omap: pm: opp: add ability to store data per opp Nishanth Menon
2010-03-18 18:44 ` [PM-WIP-OPP][PATCH 4/4] omap3: srf: remove hardcoded opp dependency Nishanth Menon
2010-03-19 14:47 ` Felipe Balbi
2010-03-19 15:36 ` Nishanth Menon [this message]
2010-03-19 10:14 ` [PM-WIP-OPP][PATCH 3/4] omap: pm: opp: add ability to store data per opp Cousson, Benoit
2010-03-19 14:27 ` Nishanth Menon
2010-03-19 14:43 ` Felipe Balbi
2010-03-19 15:25 ` Nishanth Menon
2010-03-19 17:47 ` Felipe Balbi
2010-03-19 18:10 ` Nishanth Menon
2010-03-21 21:50 ` Cousson, Benoit
2010-03-22 13:29 ` Nishanth Menon
2010-03-22 17:46 ` Cousson, Benoit
2010-03-22 18:25 ` Nishanth Menon
2010-03-23 5:06 ` Gopinath, Thara
2010-03-23 13:00 ` Nishanth Menon
2010-03-23 16:12 ` Cousson, Benoit
2010-03-23 20:04 ` Nishanth Menon
2010-03-18 22:49 ` [PM-WIP-OPP][PATCH 1/4] omap3: pm: cpufreq: BUG_ON cleanup Kevin Hilman
2010-03-19 14:21 ` Nishanth Menon
2010-03-19 14:50 ` Felipe Balbi
2010-03-19 17:46 ` Kevin Hilman
2010-03-19 17:52 ` Felipe Balbi
2010-03-19 18:42 ` Kevin Hilman
2010-03-19 19:56 ` Nishanth Menon
2010-03-19 20:49 ` Kevin Hilman
2010-03-19 21:53 ` 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=4BA39A0D.5070909@ti.com \
--to=nm@ti.com \
--cc=Tero.Kristo@nokia.com \
--cc=ambresh@ti.com \
--cc=b-cousson@ti.com \
--cc=eduardo.valentin@nokia.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=felipe.balbi@nokia.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=premi@ti.com \
--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