All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vinod Koul <vinod.koul@intel.com>, Dan Williams <djbw@fb.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 09/12] tegra20-apb-dma: remove useless use of lock
Date: Wed, 29 May 2013 16:26:28 +0530	[thread overview]
Message-ID: <51A5DEDC.4040606@nvidia.com> (raw)
In-Reply-To: <1369656882-25241-10-git-send-email-andriy.shevchenko@linux.intel.com>

On Monday 27 May 2013 05:44 PM, Andy Shevchenko wrote:
> Accordingly to dma_cookie_status() description locking is not required.
>
I think we need lock here:
 From isr handler, we call dma_cookie_complete() which is in 
spin-locked. This function updates  tx->chan->completed_cookie = tx->cookie;
In tegra_dma_tx_status(), we check for dma_cookie_status() which access 
the chan->completed_cookie; and it decides status based on this

As the access of  chan->completed_cookie  are from different context, we 
need this locking.

But did not get why it is documented as locking is not require if shared 
variable is getting changed/access from different context simultaneously.

  reply	other threads:[~2013-05-29 10:56 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 12:14 [PATCH 00/12] dma: various minor clean ups for slave drivers Andy Shevchenko
2013-05-27 12:14 ` Andy Shevchenko
2013-05-27 12:14 ` [PATCH 01/12] imx-sdma: remove useless variable Andy Shevchenko
2013-05-27 12:14 ` [PATCH 02/12] mxs-dma: " Andy Shevchenko
2013-05-27 12:14 ` [PATCH 03/12] edma: no need to assign residue to 0 explicitly Andy Shevchenko
2013-05-27 12:14 ` [PATCH 04/12] ep93xx_dma: remove useless use of lock Andy Shevchenko
2013-05-27 12:14 ` [PATCH 05/12] fsldma: " Andy Shevchenko
2013-05-27 12:14   ` Andy Shevchenko
2013-05-27 12:14 ` [PATCH 06/12] mmp_pdma: " Andy Shevchenko
2013-05-27 12:14 ` [PATCH 07/12] mpc512x_dma: " Andy Shevchenko
2013-05-27 12:14 ` [PATCH 08/12] pch_dma: " Andy Shevchenko
2013-05-27 12:14 ` [PATCH 09/12] tegra20-apb-dma: " Andy Shevchenko
2013-05-29 10:56   ` Laxman Dewangan [this message]
     [not found]     ` <51A5DEDC.4040606-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-29 13:42       ` Andy Shevchenko
2013-05-29 13:42         ` Andy Shevchenko
2013-05-27 12:14 ` [PATCH 10/12] ipu_idmac: re-use dma_cookie_status() Andy Shevchenko
2013-05-29  2:19   ` Shawn Guo
2013-05-27 12:14 ` [PATCH 11/12] mmp_tdma: set cookies as well when asked for tx status Andy Shevchenko
2013-05-27 12:14 ` [PATCH 12/12] txx9dmac: return DMA_SUCCESS immediately from device_tx_status() Andy Shevchenko
     [not found] ` <1369656882-25241-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-05-30 17:47   ` [PATCH 00/12] dma: various minor clean ups for slave drivers Vinod Koul
2013-05-30 17:47     ` Vinod Koul
2013-05-30 17:47     ` Vinod Koul
     [not found]     ` <20130530174727.GE3767-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-05-30 18:32       ` Andy Shevchenko
2013-05-30 18:32         ` Andy Shevchenko
2013-05-30 18:32         ` Andy Shevchenko
     [not found]         ` <CAHp75VcZCVskWnQuNeO4A0keZJS27vaWe5zTDomAgSa_ezyUQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15  9:37           ` Vinod Koul
2013-07-15  9:37             ` Vinod Koul
2013-07-15  9:37             ` Vinod Koul
     [not found]             ` <20130715093748.GO16653-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-15 10:21               ` Andy Shevchenko
2013-07-15 10:21                 ` Andy Shevchenko
2013-07-15 10:21                 ` Andy Shevchenko
2013-07-15  9:59                 ` Vinod Koul
2013-07-15  9:59                   ` Vinod Koul
2013-07-15  9:59                   ` Vinod Koul
2013-06-01  0:09       ` Dan Williams
2013-06-01  0:09         ` Dan Williams
2013-06-01  0:09         ` Dan Williams
     [not found]         ` <CAA9_cmdNiLfJjv-8Mh-Xb1ifZb4aw_9NGCVW6aWsfq6BN-DYyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15  9:33           ` Vinod Koul
2013-07-15  9:33             ` Vinod Koul
2013-07-15  9:33             ` Vinod Koul
2013-07-10  7:54       ` Andy Shevchenko
2013-07-10  7:54         ` Andy Shevchenko
2013-07-10  7:54         ` Andy Shevchenko

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=51A5DEDC.4040606@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=vinod.koul@intel.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.