From: Russell King <rmk@arm.linux.org.uk>
To: David Dillow <dave@thedillows.org>
Cc: Paul Mackerras <paulus@samba.org>,
Catalin Marinas <catalin.marinas@arm.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Francois Romieu <romieu@fr.zoreil.com>
Subject: Re: SMP barriers semantics
Date: Thu, 4 Mar 2010 09:33:00 +0000 [thread overview]
Message-ID: <20100304093259.GA6397@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1267669426.23829.2.camel@obelisk.thedillows.org>
On Wed, Mar 03, 2010 at 09:23:46PM -0500, David Dillow wrote:
> On Wed, 2010-03-03 at 11:55 +1100, Paul Mackerras wrote:
> > Well, if the smp_wmb() is supposed to make the assignment to
> > tp->intr_mask globally visible before any effects of the RTL_W16(),
> > then it's buggy. But from the comments it appears that the smp_wmb()
> > might be intended to order the store to tp->intr_mask with respect to
> > following cacheable stores, rather than with respect to the RTL_W16(),
> > which would be OK. I can't say without having a much closer look at
> > what that driver is actually doing.
>
> It's buggy. The code was intended to ensure the write to intr_mask was
> visible to other CPUs before we told the NIC that it could generate
> another interrupt. Give the definition of the barriers above, this
> should be wmb() instead of smp_wmb().
There's a whole bunch of other drivers doing exactly the same thing -
just grep drivers/net for smp_wmb(). ;(
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2010-03-04 9:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 10:52 SMP barriers semantics Catalin Marinas
2010-03-03 0:55 ` Paul Mackerras
2010-03-03 12:03 ` Catalin Marinas
2010-03-12 12:31 ` Ralf Baechle
2010-03-12 20:38 ` Jamie Lokier
2010-03-17 2:25 ` Benjamin Herrenschmidt
2010-03-17 10:31 ` Catalin Marinas
2010-03-17 13:42 ` Jamie Lokier
2010-03-22 12:02 ` Nick Piggin
2010-03-23 3:42 ` Nick Piggin
2010-03-23 10:24 ` Catalin Marinas
2010-04-06 14:20 ` Nick Piggin
2010-04-06 15:43 ` Jamie Lokier
2010-04-06 16:04 ` Nick Piggin
2010-04-23 16:23 ` Catalin Marinas
2010-04-23 16:56 ` Jamie Lokier
2010-04-23 17:25 ` Catalin Marinas
2010-04-24 1:45 ` Jamie Lokier
2010-04-26 9:21 ` Catalin Marinas
2010-03-04 2:23 ` David Dillow
2010-03-04 9:33 ` Russell King [this message]
2010-03-04 9:48 ` Catalin Marinas
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=20100304093259.GA6397@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=catalin.marinas@arm.com \
--cc=dave@thedillows.org \
--cc=linux-arch@vger.kernel.org \
--cc=paulus@samba.org \
--cc=romieu@fr.zoreil.com \
/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).