From: Ralf Baechle <ralf@linux-mips.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: David Daney <ddaney@avtrex.com>,
MIPS Linux List <linux-mips@linux-mips.org>
Subject: Re: What's up with cpu_is_noncoherent_r10000() ?
Date: Wed, 27 Aug 2008 00:11:04 +0100 [thread overview]
Message-ID: <20080826231104.GA18323@linux-mips.org> (raw)
In-Reply-To: <20080825184600.GA8993@alpha.franken.de>
On Mon, Aug 25, 2008 at 08:46:01PM +0200, Thomas Bogendoerfer wrote:
> On Mon, Aug 25, 2008 at 09:34:29AM -0700, David Daney wrote:
> > What is the reasoning for only doing the cache operation on R10K based
> > systems?
>
> non coherent R10k need after DMA operations to get rid of remains
> of load/store speculations. Other CPUs don't pollute the cache
> after it got flushed.
>
> But this optimization is wrong, we need to do the flush for
> every non coherent device otherwise polling a descriptor via
> a cached mapping can't work. And this exactly what E100 does.
When polling the buffer basically changes ownership between CPU and device
and buffer all the time, so a drivers needs to do a
dma_sync_*_for_cpu call before looking at the buffer, then
dma_sync_*_for_device to return the buffer to the device. So to polling
loop will work fine as long as one of the two calls does the flush operation.
In fact we're even doing double flushes for the case of non-coherent
R10000s ...
Ralf
next prev parent reply other threads:[~2008-08-26 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 16:34 What's up with cpu_is_noncoherent_r10000() ? David Daney
2008-08-25 16:57 ` Thiemo Seufer
2008-08-25 18:46 ` Thomas Bogendoerfer
2008-08-26 23:11 ` Ralf Baechle [this message]
2008-08-26 0:08 ` David Daney
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=20080826231104.GA18323@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=ddaney@avtrex.com \
--cc=linux-mips@linux-mips.org \
--cc=tsbogend@alpha.franken.de \
/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