[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1579270.z2ZaCA4LQo@wuerfel>
Date: Tue, 15 Dec 2015 16:41:18 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Timur Tabi <timur@...eaurora.org>
Cc: Christopher Covington <cov@...eaurora.org>,
Florian Fainelli <f.fainelli@...il.com>,
Gilad Avidov <gavidov@...eaurora.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, sdharia@...eaurora.org,
shankerd@...eaurora.org, gregkh@...uxfoundation.org,
vikrams@...eaurora.org
Subject: Re: [PATCH] net: emac: emac gigabit ethernet controller driver
On Tuesday 15 December 2015 09:17:00 Timur Tabi wrote:
> Arnd Bergmann wrote:
> > We generally want to use readl/writel rather than the relaxed versions,
> > unless it is in performance-critical code.
>
> What about if we have 20+ writes in a row, for example, when
> initializing a part? I've seen code like this:
>
> writel_relaxed(...);
> writel_relaxed(...);
> writel_relaxed(...);
> ...
> writel(...); // HW now inited, so enable
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.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists