From: Arnd Bergmann <arnd@arndb.de>
To: Timur Tabi <timur@codeaurora.org>
Cc: Christopher Covington <cov@codeaurora.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Gilad Avidov <gavidov@codeaurora.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
sdharia@codeaurora.org, shankerd@codeaurora.org,
gregkh@linuxfoundation.org, vikrams@codeaurora.org
Subject: Re: [PATCH] net: emac: emac gigabit ethernet controller driver
Date: Tue, 15 Dec 2015 22:55:27 +0100 [thread overview]
Message-ID: <2492153.N3Ga92jYtq@wuerfel> (raw)
In-Reply-To: <56708183.4090005@codeaurora.org>
On Tuesday 15 December 2015 15:09:23 Timur Tabi wrote:
> Arnd Bergmann wrote:
> > If that's in the probe() called from it function, just use writel() everywhere,
> > a few extra microseconds won't kill the boot time. In general, if a user would
> > notice the difference, use the relaxed version and add a comment to explain
> > how you proved it's correct, otherwise stay with the default accessors.
>
> What about adding a wmb() after the last writel()? This driver does
> that a lot. Is that something we want to discourage? I can understand
> how we would want to make sure that the last write is posted before the
> function exits.
Please explain in a comment specifically which race you are closing by
ensuring that the write gets posted. What does it race against?
As I said earlier, guaranteeing that a write gets posted does not mean
it has arrived at the device, we only get that behavior after a subsequent
read from the same device, but you don't need a wmb() between the
write and the read to guarantee this.
If you have an odd bus that does not follow those rules, it may in fact be
best to have a separate set of I/O accessors and not use readl/writel at all.
Arnd
next prev parent reply other threads:[~2015-12-15 21:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 0:19 [PATCH] net: emac: emac gigabit ethernet controller driver Gilad Avidov
2015-12-15 1:39 ` Florian Fainelli
2015-12-15 14:30 ` Christopher Covington
[not found] ` <567023F8.80302-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-15 14:50 ` Arnd Bergmann
2015-12-15 15:17 ` Timur Tabi
2015-12-15 15:41 ` Arnd Bergmann
2015-12-15 21:09 ` Timur Tabi
2015-12-15 21:55 ` Arnd Bergmann [this message]
2015-12-15 22:49 ` Gilad Avidov
2015-12-31 23:03 ` Rob Herring
[not found] ` <1450138740-32562-1-git-send-email-gavidov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-16 0:15 ` Timur Tabi
2015-12-16 3:12 ` David Miller
2015-12-16 3:30 ` Timur Tabi
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=2492153.N3Ga92jYtq@wuerfel \
--to=arnd@arndb.de \
--cc=cov@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gavidov@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sdharia@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=timur@codeaurora.org \
--cc=vikrams@codeaurora.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