From: Christoph Hellwig <hch@lst.de>
To: Mark Greer <mgreer@animalcreek.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Dale Farnsworth <dale@farnsworth.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: DMA coherency in drivers/tty/serial/mpsc.c
Date: Tue, 25 Jun 2019 14:26:41 +0200 [thread overview]
Message-ID: <20190625122641.GA4421@lst.de> (raw)
Hi Paul, Dale and Mark (I hope this reaches the right Mark),
I've started auditing all users of DMA_ATTR_NON_CONSISTENT ot prepare
for major API improvements in that area.
One of the odd users is the mpsc ѕerial driver, which allocates DMA
memory with the above flag, and then actually properly calls
dma_cache_sync. So far, so good. But it turns out it also has
"#if defined(CONFIG_PPC32) && !defined(CONFIG_NOT_COHERENT_CACHE)"
ifdef blocks next to the dma_cache_sync calls that perform cache
maintainance for platforms that according to the ifdef claim to
be cache coherent. According to the Kconfig the driver can
only build if the MV64X60 symbol is set, which is a ppc embedded 6xx
SOC, which appears to be configurable as either cache coherent, or
not. But according to the code in the driver at least this device
always is not cache coherent.
It seems like we need to always mark that platform as potentially
not coherent, and then use the per-device flag to mark all device
except for this one as coherent. Or did I miss anything? Maybe
all this is actually dead code and can go away?
next reply other threads:[~2019-06-25 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 12:26 Christoph Hellwig [this message]
2019-06-25 16:37 ` DMA coherency in drivers/tty/serial/mpsc.c Mark Greer
2019-06-26 6:48 ` Christoph Hellwig
2019-06-26 16:09 ` Mark Greer
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=20190625122641.GA4421@lst.de \
--to=hch@lst.de \
--cc=dale@farnsworth.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgreer@animalcreek.com \
--cc=paul.gortmaker@windriver.com \
/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).