From: Roland Dreier <roland@topspin.com>
To: Dan Malek <dan@embeddededge.com>
Cc: Joakim Tjernlund <Joakim.Tjernlund@lumentis.se>,
Linuxppc-Embedded <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: question on howto use invalidate_dcache_range
Date: 13 Mar 2003 11:09:00 -0800 [thread overview]
Message-ID: <52fzprt777.fsf@topspin.com> (raw)
In-Reply-To: <3E70D076.7030507@embeddededge.com>
Dan> That's a problem in any system design. Consider what would
Dan> happen if you had an architecture that was hardware cache
Dan> coherent. Software that writes to buffers at any time that
Dan> is also a DMA target will result in unpredictable behavior.
Dan> The system design for what you described requires a higher
Dan> level of shared memory software synchronization as it is
Dan> exactly the unpredictability that has to be prevented in any
Dan> SMP design.
I think you misunderstood. The dirty cache line could be produced by
a write to memory executed long before the DMA is initiated. In a
hardware cache coherent architecture, the bus controller would just
snoop the CPU's cache and invalidate the dirty cache line.
In any case the current Linux kernel seems to do things the way I
believe is necessary: pci_map_single(...PCI_DMA_FROMDEVICE)
invalidates the cache (and is done _before_ the DMA is initiated),
while pci_unmap_single() is a NOOP.
- Roland
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-03-13 19:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 11:20 question on howto use invalidate_dcache_range Stephan Linke
2003-03-13 7:40 ` Joakim Tjernlund
2003-03-13 11:00 ` Stephan Linke
2003-03-13 13:24 ` Joakim Tjernlund
2003-03-13 15:04 ` Stephan Linke
2003-03-13 16:27 ` Dan Malek
2003-03-13 17:54 ` Joakim Tjernlund
2003-03-13 18:06 ` Dan Malek
2003-03-13 18:19 ` Roland Dreier
2003-03-13 18:39 ` Dan Malek
2003-03-13 19:09 ` Roland Dreier [this message]
2003-03-13 21:54 ` Joakim Tjernlund
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=52fzprt777.fsf@topspin.com \
--to=roland@topspin.com \
--cc=Joakim.Tjernlund@lumentis.se \
--cc=dan@embeddededge.com \
--cc=linuxppc-embedded@lists.linuxppc.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 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.