linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: msm: fix dma usage not to use internal APIs
Date: Fri, 21 Jan 2011 18:13:13 +0000	[thread overview]
Message-ID: <20110121181313.GA23151@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <e95d92f6f19f474442f6e817067614e9.squirrel@www.codeaurora.org>

On Fri, Jan 21, 2011 at 08:57:42AM -0800, Brent DeGraaf wrote:
> Russell,
> 
> I just had a chat with Daniel and I think I understand what you're doing
> now.  The reason for the original change was to ensure there was a barrier
> (dmb minimum) between population of the nc box structure and the command
> port write to the datamover.

> With the original code structure, the dsb for the cache management is
> happening too early to benefit the nc writes.

That DSB has precisely *nothing* to do with making sure that anything but
the cache operations which the DMA API performed are complete by the time
the API returns.

> Since dsbs are costly operations, I elected to call the other api, then do
> the cache management with its barrier after everything was populated.
> 
> Since the nc box and the command port writes are not using writel to do
> their assignment (unless I'm missing some change here),

You must not use writel on anything but ioremapped memory.  So that's
correct.

Writing to the device registers though should be using a memory accessor
like writel.  That contains the necessary barrier to ensure that any
previous writes to memory will be ordered with respect to device writes.

As you seem to already be using writel, you have all the necessary barriers
in place provided by architecture code.

  reply	other threads:[~2011-01-21 18:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 23:03 [PATCH] mmc: msm: fix dma usage not to use internal APIs Daniel Walker
2011-01-18 23:05 ` Russell King - ARM Linux
2011-01-20 11:20 ` Daniel Walker
2011-01-20 13:02   ` Russell King - ARM Linux
2011-01-20 13:12     ` Russell King - ARM Linux
2011-01-20 15:08       ` Daniel Walker
2011-01-21 16:13         ` Brent DeGraaf
2011-01-21 16:57           ` Brent DeGraaf
2011-01-21 18:13             ` Russell King - ARM Linux [this message]
2011-01-21 19:28           ` Russell King - ARM Linux
2011-01-21 20:45             ` Daniel Walker
2011-01-21 21:17             ` David Brown
2011-01-21 21:37               ` Brent DeGraaf
2011-01-21 21:42                 ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2011-01-18 22:25 Daniel Walker
2011-01-18 22:41 ` Russell King - ARM Linux
2011-01-18 22:48   ` Daniel Walker

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=20110121181313.GA23151@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).