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] usb: ehci: fix update qtd->token in qh_append_tds
Date: Mon, 29 Aug 2011 00:36:48 +0100	[thread overview]
Message-ID: <20110828233648.GA14560@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1108281233270.3742-100000@netrider.rowland.org>

On Sun, Aug 28, 2011 at 01:00:07PM -0400, Alan Stern wrote:
> It won't do that.  All it will do is guarantee that the CPU writes out 
> dumy->hw_token before it writes out or reads in any values executed 
> after the mb.

You're right from the perspective of how things are defined today.  However,
that isn't how things work on ARM.

With ARMv6 and ARMv7, we have weak memory ordering.  This includes so
called "DMA coherent" memory.  This means that the architecture does not
guarantee the order of writes to DMA coherent memory (which is non-
cacheable normal memory) without an intervening 'data synchronization
barrier' (dsb).  Even that may not be sufficient without also poking
at the L2 cache controller.

We get around some of that by ensuring that our MMIO read/write macros
contain the necessary barriers to ensure that DMA memory is up to date
before the DMA agent is programmed.  However, this doesn't cater for
agents which continue to run in the background.

These agents will need some kind of barrier to ensure that the write
becomes visible - there's no way to get around that.  Maybe we need
yet another new barrier macro...

  reply	other threads:[~2011-08-28 23:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 14:48 [PATCH] usb: ehci: fix update qtd->token in qh_append_tds ming.lei at canonical.com
2011-08-27 15:03 ` Santosh
2011-08-27 15:18   ` Ming Lei
2011-08-27 15:46     ` Santosh
2011-08-27 15:13 ` Greg KH
2011-08-27 15:33   ` Ming Lei
2011-08-27 16:07     ` Greg KH
2011-08-27 16:57       ` Ming Lei
2011-08-27 17:20         ` Ming Lei
2011-08-27 20:11           ` Alan Stern
2011-08-28  3:35             ` Ming Lei
2011-08-27 20:06         ` Alan Stern
2011-08-28  3:13           ` Ming Lei
2011-08-28 17:00             ` Alan Stern
2011-08-28 23:36               ` Russell King - ARM Linux [this message]
2011-08-29  1:51                 ` Alan Stern
2011-08-29  8:52                   ` Russell King - ARM Linux
2011-08-29 13:57                     ` Alan Stern
2011-08-29 15:55                       ` Ming Lei
2011-08-29 16:24                         ` Mark Salter
2011-08-29 14:25               ` Ming Lei
2011-08-29 15:03                 ` Alan Stern
2011-08-29 15:21                   ` Ming Lei
2011-08-29 16:33                     ` Alan Stern
2011-08-30 14:02                       ` Ming Lei
2011-08-27 16:31 ` Sergei Shtylyov

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=20110828233648.GA14560@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).