All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "G, Manjunath Kondaiah" <manjugk@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: Issue observed with pm_runtime_put_sync
Date: Mon, 18 Oct 2010 14:38:04 -0700	[thread overview]
Message-ID: <878w1v9o77.fsf@deeprootsystems.com> (raw)
In-Reply-To: <E0D41E29EB0DAC4E9F3FF173962E9E9402DBC61717@dbde02.ent.ti.com> (Manjunath Kondaiah G.'s message of "Mon, 18 Oct 2010 21:30:43 +0530")

"G, Manjunath Kondaiah" <manjugk@ti.com> writes:

>  
> Kevin,
>
>> -----Original Message-----
>> From: Kevin Hilman [mailto:khilman@deeprootsystems.com] 
>> Sent: Monday, October 18, 2010 9:01 PM
>> To: G, Manjunath Kondaiah
>> Cc: linux-omap@vger.kernel.org
>> Subject: Re: Issue observed with pm_runtime_put_sync
>> 
>> Manjunath,
>> 
>> "G, Manjunath Kondaiah" <manjugk@ti.com> writes:
>> >  
>
> [...]
>
>> > Is this a known issue or issue with pm runtime API usage in 
>> DMA driver?
>> 
>> It's an issue in the runtime PM usage in DMA driver.
>> 
>> Specifically, the _sync versions of the API cannot be used 
>> from interrupt context because they can sleep.
>> 
>> Are the _sync versions really needed at that point?  Without 
>> having the code, I cannot tell, but I susupect that the async 
>> versions could be used there instead.
>> 
>> If not, then the code will need to be reworked so the ISR is 
>> not doing the actual work, but instead is scheduling work to 
>> be done later in process context.
>
> It looks to me this issue is related to DMA client driver since 
> DMA driver only invokes call back function registered during dma channel 
> setup. The control will be passed to DMA client driver. Now it is 
> responsibility of DMA client driver to invoke free_dma(free_dma will
> invoke put_sync) from non interrupt context.

IMO, that is an unnecessary restriction.

There is no reason that I can think of that omap_free_dma() needs to do
a _put_sync().  It should just do a normal (asynchronous) _put(), which
is safe from either process or interrupt context.

> Most of the times, callback will indicate end of data transfer, the
> client driver will release all DMA resources from interrupt context
> itself.

That's fine, and is something the DMA API has supported in the past, and
there's no reason it couldn't continue to support that.

Kevin


  parent reply	other threads:[~2010-10-18 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E0D41E29EB0DAC4E9F3FF173962E9E9402DBC61359@dbde02.ent.ti.com>
2010-10-18 15:30 ` Issue observed with pm_runtime_put_sync Kevin Hilman
2010-10-18 16:00   ` G, Manjunath Kondaiah
2010-10-18 16:11     ` Shilimkar, Santosh
2010-10-18 18:44       ` G, Manjunath Kondaiah
2010-10-18 21:42         ` Kevin Hilman
2010-10-19  5:15           ` G, Manjunath Kondaiah
2010-10-18 21:38     ` Kevin Hilman [this message]
2010-10-18  8:19 G, Manjunath Kondaiah

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=878w1v9o77.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manjugk@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 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.