public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org, johnstul@us.ibm.com,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH] clocksource: sh_tmu: Runtime PM support
Date: Tue, 31 May 2011 13:04:44 +0900	[thread overview]
Message-ID: <20110531040444.GA1745@linux-sh.org> (raw)
In-Reply-To: <20110523083005.GA11986@linux-sh.org>

On Mon, May 23, 2011 at 05:30:06PM +0900, Paul Mundt wrote:
> On Mon, Apr 25, 2011 at 10:40:26PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> > 
> > Add Runtime PM support to the TMU driver.
> > 
[snip]
> > 
> > +	/* wake up device and enable clock */
> > +	pm_runtime_get_sync(&p->pdev->dev);
> >  	ret = clk_enable(p->clk);
> >  	if (ret) {
> >  		dev_err(&p->pdev->dev, "cannot enable clock\n");
> > +		pm_runtime_put_sync(&p->pdev->dev);
> >  		return ret;
> >  	}
> >  
> At this point the spinlock hasn't been initialized yet, so any of the
> pm_runtime calls are pretty much unsafe. We could manually test
> pm_runtime_enabled() before any of the get/put_sync() calls, but that gets to
> be a bit ugly.

Note that I will be reverting these patches for -rc2 if no progress is
made here. This is a fundamental ordering issue with regards to locking,
and is completely bogus for every SMP platform we have.

  reply	other threads:[~2011-05-31  4:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25 13:40 [PATCH] clocksource: sh_tmu: Runtime PM support Magnus Damm
2011-04-28 20:55 ` john stultz
2011-05-23  8:30 ` Paul Mundt
2011-05-31  4:04   ` Paul Mundt [this message]
2011-05-31  6:22     ` Paul Mundt

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=20110531040444.GA1745@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.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