All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] OMAP: fix DMA vs memory ordering
Date: Mon, 16 Apr 2012 09:57:44 +0530	[thread overview]
Message-ID: <4F8B9FC0.6090406@ti.com> (raw)
In-Reply-To: <20120414132435.GS24211@n2100.arm.linux.org.uk>

On Saturday 14 April 2012 06:54 PM, Russell King - ARM Linux wrote:
> Using coherent DMA memory with the OMAP DMA engine results in
> unpredictable behaviour due to memory ordering issues; as things stand,
> there is no guarantee that data written to coherent DMA memory will be
> visible to the DMA hardware.
> 
> This is because the OMAP dma_write() accessor contains no barriers,
> necessary on ARMv6 and above.  The effect of this can be seen in comments
> in the OMAP serial driver, which incorrectly talks about cache flushing
> for the coherent DMA stuff.
> 
> Rather than adding barriers to the accessors, add it in the DMA support
> code just before we enable DMA, and just after we disable DMA.  This
> avoids having barriers for every DMA register access.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
I don't why the synchronisation in dma_[start/stop] was
missing. The patch indeed make complete sense.



> Is this why no one uses DMA with the serial driver?
>
Will check if this patch helps in some of the DMA issues
seen in serial driver.

Regards
Santosh

WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] OMAP: fix DMA vs memory ordering
Date: Mon, 16 Apr 2012 09:57:44 +0530	[thread overview]
Message-ID: <4F8B9FC0.6090406@ti.com> (raw)
In-Reply-To: <20120414132435.GS24211@n2100.arm.linux.org.uk>

On Saturday 14 April 2012 06:54 PM, Russell King - ARM Linux wrote:
> Using coherent DMA memory with the OMAP DMA engine results in
> unpredictable behaviour due to memory ordering issues; as things stand,
> there is no guarantee that data written to coherent DMA memory will be
> visible to the DMA hardware.
> 
> This is because the OMAP dma_write() accessor contains no barriers,
> necessary on ARMv6 and above.  The effect of this can be seen in comments
> in the OMAP serial driver, which incorrectly talks about cache flushing
> for the coherent DMA stuff.
> 
> Rather than adding barriers to the accessors, add it in the DMA support
> code just before we enable DMA, and just after we disable DMA.  This
> avoids having barriers for every DMA register access.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
I don't why the synchronisation in dma_[start/stop] was
missing. The patch indeed make complete sense.



> Is this why no one uses DMA with the serial driver?
>
Will check if this patch helps in some of the DMA issues
seen in serial driver.

Regards
Santosh

  reply	other threads:[~2012-04-16  4:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14 13:24 [PATCH] OMAP: fix DMA vs memory ordering Russell King - ARM Linux
2012-04-14 13:24 ` Russell King - ARM Linux
2012-04-16  4:27 ` Santosh Shilimkar [this message]
2012-04-16  4:27   ` Santosh Shilimkar
2012-04-16 17:58 ` Tony Lindgren
2012-04-16 17:58   ` Tony Lindgren

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=4F8B9FC0.6090406@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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.