linux-mips
[Top] [All Lists]

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

To: Joshua Kinard <kumba@gentoo.org>
Subject: Re: [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue, 27 Dec 2011 14:34:41 -0800
Cc: netdev@vger.kernel.org, Linux MIPS List <linux-mips@linux-mips.org>
In-reply-to: <4EFA38D5.1000602@gentoo.org>
Organization: Vyatta
References: <4EED3A3D.9080503@gentoo.org> <4EF95247.7000403@gentoo.org> <20111227103408.01aad10e@nehalam.linuxnetplumber.net> <4EFA38D5.1000602@gentoo.org>
Sender: linux-mips-bounce@linux-mips.org
On Tue, 27 Dec 2011 16:29:57 -0500
Joshua Kinard <kumba@gentoo.org> wrote:

> 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.

<Prev in Thread] Current Thread [Next in Thread>