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  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 transaction may finish.  In that case, we don't receive the
> interrupt (because they are disabled), but _start() sees that the DMA
> is stopped, so it starts it.  The problem is that it sends the
> transaction that has just finished again, because pl330_update()
> hasn't mark it as done yet.
>
> This patch fixes this race condition by not calling _start() if the
> DMA is already executing transactions.  When interrupts are reenabled,
> pl330_update() will call _start().
>
> Signed-off-by: Javi Merino 
> Acked-by: Jassi Brar 
> ---
>  arch/arm/common/pl330.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c
> index 97912fa..7129cfb 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 pl330_chan_op op)
>
>                /* Start the next */
>        case PL330_OP_START:
> -               if (!_start(thrd))
> +               if (!_thrd_active(thrd) && !_start(thrd))
>                        ret = -EIO;
>                break;

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.

I have not debugged this much but if there is something that I am
missing, please let me know. Meanwhile, I will continue checking on
this.

Thanks,
Thomas.


>
> --
> 1.7.0.4
>
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PULL] Samsung devel-4 for v3.2

2011-11-05 Thread Kukjin Kim

On 11/05/11 08:56, Arnd Bergmann wrote:

On Saturday 05 November 2011, Kukjin Kim wrote:

Arnd Bergmann wrote:



Please send the contents split up into separate branches (dt, spi, clkdev,
rename, devel) for 3.3. I think it's ok if you want to send just the
rename patch for 3.2 the way we had discussed earlier, because this kind
of patch really makes sense at the end of the merge window.


Hi Arnd,

OK, I will send the rename branch in a half an hour and make separate
branches for others which will be merged next time.


Ok, very good. I'm sending the pull requests for the other two branches
right now, I assume Linus will take them quickly (or not at all if he
has unexpected objections), so you could base your pull request on top
of his merge.



Hi Arnd,

I remade 'next-samsung-exynos' branch based on latest mainline which 
includes arm-soc/next/cleanup3 and arm-soc/next/devel2 just now so that 
you can send it to Linus easily :)


If any problems, please let me know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PULL] Samsung Exynos for v3.2

2011-11-05 Thread Kukjin Kim

On 11/05/11 09:01, Kukjin Kim wrote:

Hi Arnd,

As you suggested, I made reorganization mach-exynos branch,
next-samsung-exynos in my tree and it has been tested on some boards.

Please pull from:
   git://github.com/kgene/linux-samsung.git next-samsung-exynos

As a note, will finish other separate branch today.

If any problems, please let me know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.



Hi Arnd,

As I replied, I re-based 'next-samsung-exynos' based on latest mainline.

So changes since previous pull request:

The following changes since commit c861cd3e92d92ae946e19099f198018fcb4fd887:

  Merge branch 'next/devel2' of 
git://git.linaro.org/people/arnd/arm-soc (2011-11-05 18:21:21 -0700)


are available in the git repository at:

  git://github.com/kgene/linux-samsung.git next-samsung-exynos

Others same, if any problems, please kindly let me know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


The following changes since commit 2ef9270f2481543e49bfbdc0d125f0bf3068d246:

   Merge remote branch 'arm-soc/next/devel2' into next-samsung-dt (2011-11-02
19:12:59 +0900)

are available in the git repository at:

   git://github.com/kgene/linux-samsung.git next-samsung-exynos

Jonghwan Choi (1):
   ARM: SAMSUNG: Fix compile error due to kfree

Joonyoung Shim (1):
   ARM: SAMSUNG: Add clk enable/disable of pwm

Kukjin Kim (1):
   ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos

Marc Zyngier (1):
   ARM: EXYNOS4: convert MCT to percpu interrupt API

  arch/arm/Kconfig   |8 +-
  arch/arm/Makefile  |2 +-
  arch/arm/configs/exynos4_defconfig |9 +--
  arch/arm/{mach-exynos4 =>  mach-exynos}/Kconfig |   41 +---
  arch/arm/{mach-exynos4 =>  mach-exynos}/Makefile|   11 ++--
  .../{mach-exynos4 =>  mach-exynos}/Makefile.boot|0
  .../clock-exynos4210.c |0
  .../clock-exynos4212.c |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/clock.c |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/cpu.c   |   69
+++-
  arch/arm/{mach-exynos4 =>  mach-exynos}/cpuidle.c   |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/dev-ahci.c  |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/dev-audio.c |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/dev-dwmci.c |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/dev-pd.c|0
  .../arm/{mach-exynos4 =>  mach-exynos}/dev-sysmmu.c |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/dma.c   |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/headsmp.S   |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/hotplug.c   |0
  .../include/mach/debug-macro.S |0
  .../include/mach/dma.h |0
  .../include/mach/dwmci.h   |0
  .../include/mach/entry-macro.S |0
  .../include/mach/exynos4-clock.h   |0
  .../include/mach/gpio.h|0
  .../include/mach/hardware.h|0
  .../include/mach/io.h  |0
  .../include/mach/irqs.h|0
  .../include/mach/map.h |   32 ++
  .../include/mach/memory.h  |0
  .../include/mach/pm-core.h |0
  .../include/mach/pmu.h |0
  .../include/mach/regs-audss.h  |0
  .../include/mach/regs-clock.h  |0
  .../include/mach/regs-gpio.h   |0
  .../include/mach/regs-irq.h|0
  .../include/mach/regs-mct.h|0
  .../include/mach/regs-mem.h|0
  .../include/mach/regs-pmu.h|0
  .../include/mach/regs-sysmmu.h |0
  .../include/mach/regs-usb-phy.h|0
  .../include/mach/sysmmu.h  |0
  .../include/mach/system.h  |0
  .../include/mach/timex.h   |0
  .../include/mach/uncompress.h  |0
  .../include/mach/vmalloc.h |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/init.c  |0
  .../{mach-exynos4 =>  mach-exynos}/irq-combiner.c   |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/irq-eint.c  |0
.../mach-armlex4210.c  |0
  arch/arm/{mach-exynos4 =>  mach-exynos}/mach-nuri.c |0
  .../{mach-exynos4 =>  mach-exynos}/mach-origen.c|0
  .../{mach-exynos4 =>  mach-exynos}/mach-smdk4x12.c  |0
  .../{mach-exynos4 =>  mach-exynos}/mach-smdkv310.c  |0
  .../mach-univers