From: Dmitry Osipenko <digetx@gmail.com>
To: Laxman Dewangan <ldewangan@nvidia.com>,
Vinod Koul <vkoul@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1] dmaengine: tegra: Use relaxed versions of readl/writel
Date: Thu, 25 Apr 2019 02:17:08 +0300 [thread overview]
Message-ID: <20190424231708.21219-1-digetx@gmail.com> (raw)
The readl/writel functions are inserting memory barrier in order to
ensure that memory stores are completed. On Tegra20 and Tegra30 this
results in L2 cache syncing which isn't a cheapest operation. The
tegra20-apb-dma driver doesn't need to synchronize generic memory
accesses, hence use the relaxed versions of the functions.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/dma/tegra20-apb-dma.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index cf462b1abc0b..e646e1c7b299 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -241,23 +241,23 @@ struct tegra_dma {
static inline void tdma_write(struct tegra_dma *tdma, u32 reg, u32 val)
{
- writel(val, tdma->base_addr + reg);
+ writel_relaxed(val, tdma->base_addr + reg);
}
static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
{
- return readl(tdma->base_addr + reg);
+ return readl_relaxed(tdma->base_addr + reg);
}
static inline void tdc_write(struct tegra_dma_channel *tdc,
u32 reg, u32 val)
{
- writel(val, tdc->chan_addr + reg);
+ writel_relaxed(val, tdc->chan_addr + reg);
}
static inline u32 tdc_read(struct tegra_dma_channel *tdc, u32 reg)
{
- return readl(tdc->chan_addr + reg);
+ return readl_relaxed(tdc->chan_addr + reg);
}
static inline struct tegra_dma_channel *to_tegra_dma_chan(struct dma_chan *dc)
--
2.21.0
next reply other threads:[~2019-04-24 23:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 23:17 Dmitry Osipenko [this message]
2019-04-26 9:52 ` [PATCH v1] dmaengine: tegra: Use relaxed versions of readl/writel Jon Hunter
2019-04-26 10:45 ` Dmitry Osipenko
2019-04-26 11:13 ` Jon Hunter
2019-04-26 12:18 ` Dmitry Osipenko
2019-04-26 12:42 ` Dmitry Osipenko
2019-04-26 13:03 ` Dmitry Osipenko
2019-04-26 15:11 ` Thierry Reding
2019-04-30 12:25 ` Dmitry Osipenko
2019-04-26 12:01 ` Vinod Koul
2019-04-26 12:19 ` Dmitry Osipenko
2019-04-26 12:47 ` Vinod Koul
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=20190424231708.21219-1-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vkoul@kernel.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).