From: Ralf Baechle <ralf@linux-mips.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org, cernekee@gmail.com, jaedon.shin@gmail.com
Subject: Re: [PATCH 1/2] MIPS: BMIPS: Flush the readahead cache after DMA
Date: Fri, 27 Mar 2015 13:04:05 +0100 [thread overview]
Message-ID: <20150327120405.GP1385@linux-mips.org> (raw)
In-Reply-To: <1427345715-16516-2-git-send-email-f.fainelli@gmail.com>
On Wed, Mar 25, 2015 at 09:55:14PM -0700, Florian Fainelli wrote:
> From: Kevin Cernekee <cernekee@gmail.com>
>
> BMIPS 3300/435x/438x CPUs have a readahead cache that is separate from
> the L1/L2. During a DMA operation, accesses adjacent to a DMA buffer
> may cause parts of the DMA buffer to be prefetched into the RAC. To
> avoid possible coherency problems, flush the RAC upon DMA completion.
>
> Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
> Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> arch/mips/include/asm/bmips.h | 2 +-
> arch/mips/mm/dma-default.c | 15 +++++++++++++++
> 2 files changed, 16 insertions(+), 1 deletion(-)
I'm not keen on including platform-specific files that may blow up on
another platform. So what I suggest instead is something like rewriting
cpu_needs_post_dma_flush() to invoke a platform-specific hook function
plat_post_dma_flush() which would be defined in <asm/dma-coherence.h>
rsp. <mach/dma-coherence.h>.
I'm going to whip up something.
Ralf
next prev parent reply other threads:[~2015-03-27 12:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 4:55 [PATCH 0/2] BMIPS: trivial fixes Florian Fainelli
2015-03-26 4:55 ` [PATCH 1/2] MIPS: BMIPS: Flush the readahead cache after DMA Florian Fainelli
2015-03-27 12:04 ` Ralf Baechle [this message]
2015-03-27 21:34 ` Kevin Cernekee
2015-03-26 4:55 ` [PATCH 2/2] MIPS: BMIPS: restrict DTB selection to BMIPS_GENERIC Florian Fainelli
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=20150327120405.GP1385@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=cernekee@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=jaedon.shin@gmail.com \
--cc=linux-mips@linux-mips.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