- To: Richard Zhao <richard.zhao@xxxxxxxxxxxxx>
- Subject: Re: [PATCH] clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
- From: "Turquette, Mike" <mturquette@xxxxxx>
- Date: Tue, 15 May 2012 22:40:11 -0700
- Cc: Saravana Kannan <skannan@xxxxxxxxxxxxxx>, Andrew Lunn <andrew@xxxxxxx>, Grant Likely <grant.likely@xxxxxxxxxxxx>, Jamie Iles <jamie@xxxxxxxxxxxxx>, Jeremy Kerr <jeremy.kerr@xxxxxxxxxxxxx>, Magnus Damm <magnus.damm@xxxxxxxxx>, Deepak Saxena <dsaxena@xxxxxxxxxx>, Shawn Guo <shawn.guo@xxxxxxxxxxxxx>, Arnd Bergman <arnd.bergmann@xxxxxxxxxx>, linux-arm-msm@xxxxxxxxxxxxxxx, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Rob Herring <rob.herring@xxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Richard Zhao <richard.zhao@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Paul Walmsley <paul@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Amit Kucheria <amit.kucheria@xxxxxxxxxx>
- In-reply-to: <20120516002500.GD29393@b20223-02.ap.freescale.net>
On Tue, May 15, 2012 at 5:25 PM, Richard Zhao
<richard.zhao@xxxxxxxxxxxxx> wrote:
> On Tue, May 15, 2012 at 01:43:42PM -0700, Saravana Kannan wrote:
>> The clk_set_rate() code shouldn't check the clock's enable count when
>> validating CLK_SET_RATE_GATE flag since the enable count could change after
>> the validation. Similar to clk_set_parent(), it should instead check the
>> prepare count. The prepare count should go to zero only when the end user
>> expects the clock to not be enabled in the future. Since the code already
>> grabs the prepare count before validation, it's not possible for prepare
>> count to change after validation and by association not possible for a well
>> behaving end user to enable the clock while the set rate is in progress.
>>
>> Signed-off-by: Saravana Kannan <skannan@xxxxxxxxxxxxxx>
> Reviewed-by: Richard Zhao <richard.zhao@xxxxxxxxxxxxx>
Looks good to me. I'll take into clk-next for one final pull request
to arm-soc.
Thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux ARM Kernel]
[Linux ARM]
[Linux Omap]
[Fedora ARM]
[Linux for Sparc]
[IETF Annouce]
[Security]
[Bugtraq]
[Linux OMAP]
[Linux MIPS]
[ECOS]
[Asterisk Internet PBX]
[Linux API]