Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: 'Jassi Brar' <jaswinder.singh@linaro.org>,
	'Boojin Kim' <boojin.kim@samsung.com>,
	"vinod.koul@intel.com" <vinod.koul@intel.com>,
	"jassisinghbrar@gmail.com" <jassisinghbrar@gmail.com>,
	'linux-samsung-soc' <linux-samsung-soc@vger.kernel.org>,
	'Thomas Abraham' <thomas.abraham@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] ARM: pl330: Fix a race condition
Date: Wed, 07 Dec 2011 10:01:45 +0000	[thread overview]
Message-ID: <4EDF3989.3060108@arm.com> (raw)
In-Reply-To: <03f001ccb4b5$3441f5c0$9cc5e140$%kim@samsung.com>

On 07/12/11 07:52, Kukjin Kim wrote:
> Jassi Brar wrote:
>>
>> On 29 November 2011 15:23, Javi Merino <javi.merino@arm.com> wrote:
>>>>>>>> On Samsung's Exynos4 platform, while testing audio playback with
>>>>> i2s
>>>>>>>> interface, the above change causes the playback to freeze. The
>>>>>>>> _thrd_active(thrd) call always returns '1' and hence _start(thrd)
>>>>> is
>>>>>>>> not getting called.
>>>>>>>
>>>>>>> If _thrd_active(thrd) returns '1', that means there is an active
>>>>>>> transfer still running or, if it has finished, you haven't called
>>>>>>> pl330_update() to acknowledge that.  pl330_update() calls _start()
>>>>> as
>>>>>>> soon as it can.
>>>>>>>
>>>>>>> drivers/dma/pl330.c registers the irq handler in pl330_probe(), so
>>>>>>> when
>>>>>>> the transaction finishes, pl330_update() should clear it and call
>>>>>>> _start().  If there is any outstanding transaction, it should start
>>>>>>> straight away. If there isn't, it would mark the channel as free,
>>>>> so
>>>>>>> _thrd_active() should return '0'.  If _thrd_active() is still '1',
>>>>> then
>>>>>>> something has gone wrong in the way.
>>>>>>>
>>>>>>> Does this shed some light?
>>>>>>>
>>>>>>
>>>>>> Your patch makes the memcpy operation on dmatest.c and net DMA be
>>>>> frozen too
>>>>>> as well as Samsung audio playback.
>>>>>
>>>>> Is the IRQ correctly registered in drivers/dma/pl330.c:pl330_probe()?
>>>>> Do you get interrupts when the transfer finish?
>>>> Sure. IRQ works well.
>>>
>>> Ok, so can you check if pl330_update() is correctly marking the request
>>> as free?  Do you know if there is another request in the queue when that
>>> happens?
>>>
>>> Thomas, you said in a previous email that _thrd_active() always returned
>>> '1'.  Was that after a request in req[0] finished?
>>>  - If so, can you check that MARK_FREE was actually called for that
>>>    request in pl330_update()?
>>>  - If it was after a request in req[1] finished and there was a
>>>    request already waiting in req[0], can you debug why _start()
>>>    didn't activate it.
>>>
>> Javi, could you please check if you too get the memcpy failure with
>> dmatest ?
> 
> (Please adding me in this thread)
> 
> Hi Javi,
> How was going on the test? If any update, please let us know.

I'm currently very busy at work, I'll run it as soon as I can.  This
appears to happen only in exynos, can't anybody else help with the
debugging?

Cheers,
Javi

  reply	other threads:[~2011-12-07 10:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E8C5425.80303@arm.com>
     [not found] ` <1317892206-3600-1-git-send-email-javi.merino@arm.com>
2011-11-05 19:05   ` [PATCH v2] ARM: pl330: Fix a race condition Thomas Abraham
2011-11-07 10:48     ` Javi Merino
2011-11-07 11:03       ` Thomas Abraham
2011-11-28  8:23       ` Boojin Kim
2011-11-28 16:36         ` Javi Merino
2011-11-29  3:41           ` Boojin Kim
2011-11-29  9:53             ` Javi Merino
2011-11-29 10:37               ` Jassi Brar
2011-12-07  7:52                 ` Kukjin Kim
2011-12-07 10:01                   ` Javi Merino [this message]
2011-12-07 20:54                     ` Javi Merino
2011-12-09 11:58                       ` Javi Merino
2011-12-09 13:04                         ` Jassi Brar
2011-12-09 13:41                           ` Javi Merino
2011-12-09 14:15                             ` Jassi Brar
2011-12-09 14:52                               ` Javi Merino
2011-12-09 16:50                                 ` Jassi Brar
2011-12-09 19:50                                   ` Javi Merino
2011-12-11 10:51                                     ` Jassi Brar
2011-12-11 15:09                                       ` Javi Merino
2011-12-11 17:10                                         ` Jassi Brar
2011-12-11 17:42                                           ` Javi Merino
2011-12-11 19:27                                             ` [PATCH] ARM: PL330: Fix driver freeze Javi Merino
2011-12-15 17:48                                               ` Javi Merino
2011-12-16  9:01                                                 ` Tushar Behera
2011-12-16  6:27                                               ` Jassi Brar

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=4EDF3989.3060108@arm.com \
    --to=javi.merino@arm.com \
    --cc=boojin.kim@samsung.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=thomas.abraham@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox