All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Saravana Kannan <skannan@codeaurora.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Paul Walmsley <paul@pwsan.com>,
	Mike Turquette <mturquette@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-arm-msm@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-kernel@vger.kernel.org,
	Rob Herring <rob.herring@calxeda.com>,
	Richard Zhao <richard.zhao@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Deepak Saxena <dsaxena@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Shawn Guo <shawn.guo@freescale.com>,
	Amit Kucheria <amit.kucheria@linaro.org>,
	Jamie Iles <jamie@jamieiles.com>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergman <arnd.bergmann@linaro.org>,
	Jeremy Kerr <jeremy.kerr@canonical.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: Fix race conditions between clk_set_parent() and clk_enable()
Date: Tue, 15 May 2012 22:00:40 +0200	[thread overview]
Message-ID: <20120515200040.GP30400@pengutronix.de> (raw)
In-Reply-To: <4FB2B3AA.3010903@codeaurora.org>

On Tue, May 15, 2012 at 12:51:06PM -0700, Saravana Kannan wrote:
> >>  	ret = clk->ops->set_parent(clk->hw, i);
> >
> >You call ->set_parent while holding a spinlock. This won't work with i2c
> >clocks.
> 
> I did account for that. I explained it in the commit text. Please
> let me know if any part of that is not clear or is not correct.
>

I missed this part in the commit log. I have no idea whether we can live
with this limitation though.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Saravana Kannan <skannan@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>,
	Arnd Bergman <arnd.bergmann@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Andrew Lunn <andrew@lunn.ch>,
	Rob Herring <rob.herring@calxeda.com>,
	Russell King <linux@arm.linux.org.uk>,
	Jeremy Kerr <jeremy.kerr@canonical.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Walmsley <paul@pwsan.com>,
	Shawn Guo <shawn.guo@freescale.com>,
	Jamie Iles <jamie@jamieiles.com>,
	Richard Zhao <richard.zhao@linaro.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Amit Kucheria <amit.kucheria@linaro.org>,
	Deepak Saxena <dsaxena@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH] clk: Fix race conditions between clk_set_parent() and clk_enable()
Date: Tue, 15 May 2012 22:00:40 +0200	[thread overview]
Message-ID: <20120515200040.GP30400@pengutronix.de> (raw)
In-Reply-To: <4FB2B3AA.3010903@codeaurora.org>

On Tue, May 15, 2012 at 12:51:06PM -0700, Saravana Kannan wrote:
> >>  	ret = clk->ops->set_parent(clk->hw, i);
> >
> >You call ->set_parent while holding a spinlock. This won't work with i2c
> >clocks.
> 
> I did account for that. I explained it in the commit text. Please
> let me know if any part of that is not clear or is not correct.
>

I missed this part in the commit log. I have no idea whether we can live
with this limitation though.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Fix race conditions between clk_set_parent() and clk_enable()
Date: Tue, 15 May 2012 22:00:40 +0200	[thread overview]
Message-ID: <20120515200040.GP30400@pengutronix.de> (raw)
In-Reply-To: <4FB2B3AA.3010903@codeaurora.org>

On Tue, May 15, 2012 at 12:51:06PM -0700, Saravana Kannan wrote:
> >>  	ret = clk->ops->set_parent(clk->hw, i);
> >
> >You call ->set_parent while holding a spinlock. This won't work with i2c
> >clocks.
> 
> I did account for that. I explained it in the commit text. Please
> let me know if any part of that is not clear or is not correct.
>

I missed this part in the commit log. I have no idea whether we can live
with this limitation though.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-05-15 20:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12  4:59 [PATCH] clk: Fix race conditions between clk_set_parent() and clk_enable() Saravana Kannan
2012-05-12  4:59 ` Saravana Kannan
2012-05-15 18:20 ` Saravana Kannan
2012-05-15 18:20   ` Saravana Kannan
2012-05-22 13:58   ` Peter De Schrijver
2012-05-22 13:58     ` Peter De Schrijver
2012-05-22 13:58     ` Peter De Schrijver
2012-05-22 18:06     ` Turquette, Mike
2012-05-22 18:06       ` Turquette, Mike
2012-05-22 18:06       ` Turquette, Mike
2012-05-23  9:16       ` Peter De Schrijver
2012-05-23  9:16         ` Peter De Schrijver
2012-05-23  9:16         ` Peter De Schrijver
2012-05-31  3:46         ` Saravana Kannan
2012-05-31  3:46           ` Saravana Kannan
2012-05-31  3:46           ` Saravana Kannan
2012-05-15 19:42 ` Sascha Hauer
2012-05-15 19:42   ` Sascha Hauer
2012-05-15 19:42   ` Sascha Hauer
2012-05-15 19:51   ` Saravana Kannan
2012-05-15 19:51     ` Saravana Kannan
2012-05-15 20:00     ` Sascha Hauer [this message]
2012-05-15 20:00       ` Sascha Hauer
2012-05-15 20:00       ` Sascha Hauer
2012-05-15 20:09       ` Saravana Kannan
2012-05-15 20:09         ` Saravana Kannan
2012-05-16  5:59         ` Turquette, Mike
2012-05-16  5:59           ` Turquette, Mike
2012-05-16  9:19           ` skannan
2012-05-16  9:19             ` skannan at codeaurora.org
2012-05-16  9:19             ` skannan
2012-05-15 20:43 ` [PATCH] clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate() Saravana Kannan
2012-05-15 20:43   ` Saravana Kannan
2012-05-15 22:31   ` Richard Zhao
2012-05-15 22:31     ` Richard Zhao
2012-05-16  0:25   ` Richard Zhao
2012-05-16  0:25     ` Richard Zhao
2012-05-16  0:25     ` Richard Zhao
2012-05-16  5:40     ` Turquette, Mike
2012-05-16  5:40       ` Turquette, Mike
2012-05-16  6:00 ` [PATCH] clk: Fix race conditions between clk_set_parent() and clk_enable() Turquette, Mike
2012-05-16  6:00   ` Turquette, Mike
2012-05-16  7:30   ` Linus Walleij
2012-05-16  7:30     ` Linus Walleij

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=20120515200040.GP30400@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=amit.kucheria@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=arnd.bergmann@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dsaxena@linaro.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jamie@jamieiles.com \
    --cc=jeremy.kerr@canonical.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@linaro.org \
    --cc=paul@pwsan.com \
    --cc=richard.zhao@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=sboyd@codeaurora.org \
    --cc=shawn.guo@freescale.com \
    --cc=skannan@codeaurora.org \
    --cc=tglx@linutronix.de \
    /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.