Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Jassi Brar
On Sat, Dec 10, 2011 at 1:20 AM, Javi Merino javi.mer...@arm.com wrote: What about properly tracking what we have sent to the DMA?  Something like the following (warning *ugly* and untested code ahead, may eat your kitten): diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Javi Merino
On 11/12/11 10:51, Jassi Brar wrote: On Sat, Dec 10, 2011 at 1:20 AM, Javi Merino javi.mer...@arm.com wrote: What about properly tracking what we have sent to the DMA? Something like the following (warning *ugly* and untested code ahead, may eat your kitten): Yeah, this is like I said

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Jassi Brar
On 11 December 2011 20:39, Javi Merino javi.mer...@arm.com wrote: What about properly tracking what we have sent to the DMA?  Something like the following (warning *ugly* and untested code ahead, may eat your kitten): Yeah, this is like I said 'marker' method. Though we can clean it up a

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Javi Merino
On 11/12/11 17:10, Jassi Brar wrote: On 11 December 2011 20:39, Javi Merino javi.mer...@arm.com wrote: What about properly tracking what we have sent to the DMA? Something like the following (warning *ugly* and untested code ahead, may eat your kitten): Yeah, this is like I said 'marker'

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-09 Thread Javi Merino
On 07/12/11 20:54, Javi Merino wrote: On 07/12/11 10:01, Javi Merino wrote: On 07/12/11 07:52, Kukjin Kim wrote: Jassi Brar wrote: On 29 November 2011 15:23, Javi Merino javi.mer...@arm.com wrote: On Samsung's Exynos4 platform, while testing audio playback with i2s interface, the above

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-09 Thread Jassi Brar
Hi Javi, On 9 December 2011 17:28, Javi Merino javi.mer...@arm.com wrote: Javi, could you please check if you too get the memcpy failure with dmatest ? Ok, I think I've just reproduced it in my end with the kernel's dmatest module.  After the first transaction it looks like the dma test

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-09 Thread Jassi Brar
On Fri, Dec 9, 2011 at 8:22 PM, Javi Merino javi.mer...@arm.com wrote: I think the best solution would be to revert ee3f615819404a9438b2dd01b7a39f276d2737f2 and go back to my original patch (in the beginning of this thread): http://article.gmane.org/gmane.linux.ports.arm.kernel/133110 What

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-09 Thread Javi Merino
On 09/12/11 16:50, Jassi Brar wrote: What do you think about ... diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index f407a6b..3a51cdd 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c @@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-29 Thread Javi Merino
On 29/11/11 03:41, Boojin Kim wrote: Javi Merino 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

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-29 Thread Jassi Brar
On 29 November 2011 15:23, Javi Merino javi.mer...@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

RE: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-28 Thread Boojin Kim
Javi Merino 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

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-28 Thread Javi Merino
On 28/11/11 08:23, Boojin Kim wrote: Javi Merino 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

RE: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-28 Thread Boojin Kim
Javi Merino 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

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-07 Thread Javi Merino
On 05/11/11 19:05, Thomas Abraham wrote: Hi Javi, On 6 October 2011 05:10, Javi Merino javi.mer...@arm.com wrote: If two requests have been submitted and one of them is running, if you call pl330_chan_ctrl(ch_id, PL330_OP_START), there's a window of time between the spin_lock_irqsave() and

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-07 Thread Thomas Abraham
On 7 November 2011 16:18, Javi Merino javi.mer...@arm.com wrote: On 05/11/11 19:05, Thomas Abraham wrote: Hi Javi, On 6 October 2011 05:10, Javi Merino javi.mer...@arm.com wrote: If two requests have been submitted and one of them is running, if you call pl330_chan_ctrl(ch_id,

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-11-05 Thread Thomas Abraham
Hi Javi, On 6 October 2011 05:10, Javi Merino javi.mer...@arm.com wrote: If two requests have been submitted and one of them is running, if you call pl330_chan_ctrl(ch_id, PL330_OP_START), there's a window of time between the spin_lock_irqsave() and the _state() check in which the running