Thread (19 messages) 19 messages, 4 authors, 2011-12-28

Re: [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery

From: Stephen Hemminger <hidden>
Date: 2011-12-28 00:29:07
Also in: linux-mips

On Tue, 27 Dec 2011 17:48:32 -0500
Joshua Kinard [off-list ref] wrote:
On 12/27/2011 17:34, Stephen Hemminger wrote:
quoted
On Tue, 27 Dec 2011 16:29:57 -0500
Joshua Kinard [off-list ref] wrote:
quoted
MIPS I/O registers are always memory-mapped, and to prevent the compiler
from trying to over-optimize, volatile is used to make sure we always read a
value from the hardware and not from some cached value.
Almost every other network driver had memory mapped register.
The problem is volatile is that the compiler is stupid and wrong.
Using explicit barriers is preferred and ensures correct and fast
code.

I am somewhat new to driver development, so I do not know all the tricks of
the trade just yet.  Do you have references to doing explicit barriers that
I can look at?  Might be worth trying on the RTC driver I have to get the
hang of them.
Start by reading volatile considered harmful and memory barriers in kernel
Documentation directory. Paul does a better job of explaining it than
I could ever do :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help