From: Nick Piggin <npiggin@suse.de>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [patch 1/2] powerpc: rmb fix
Date: Wed, 22 Aug 2007 05:15:06 +0200 [thread overview]
Message-ID: <20070822031506.GA26374@wotan.suse.de> (raw)
In-Reply-To: <d9f43b5c31fde5851a7af1d0f36eb134@kernel.crashing.org>
On Tue, Aug 21, 2007 at 09:43:17PM +0200, Segher Boessenkool wrote:
> >> #define mb() __asm__ __volatile__ ("sync" : : : "memory")
> >>-#define rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : :
> >>"memory")
> >>+#define rmb() __asm__ __volatile__ ("sync" : : : "memory")
> >> #define wmb() __asm__ __volatile__ ("sync" : : : "memory")
> >> #define read_barrier_depends() do { } while(0)
> >>
> >>@@ -42,7 +42,7 @@
> >> #ifdef __KERNEL__
> >> #ifdef CONFIG_SMP
> >> #define smp_mb() mb()
> >>-#define smp_rmb() rmb()
> >>+#define smp_rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : :
> >>"memory")
> >> #define smp_wmb() eieio()
> >> #define smp_read_barrier_depends() read_barrier_depends()
> >> #else
> >
> >I had to think about this one for awhile. It looks at first glance to
> >be the right
> >thing to do. But I do wonder how long rmb() has been lwsync
>
> Since the {ppc,ppc64} -> powerpc merge.
>
> >and if as a practical matter that has caused any problems?
>
> It has not as far as I know.
>
> >If this isn't causing any problems maybe there
> >is some loigic we are overlooking?
>
> The I/O accessor functions enforce the necessary ordering
> already I believe.
Hmm, I never followed those discussions last year about IO ordering, and
I can't see where (if) it was documented anywhere :(
It appears that legacy code is handled by defining the old IO accessors to
be completely ordered, and introducing new __raw_ variants that are not
(OTOH, it seems like other architectures are implementing __raw prefix as
inorder unless there is a _relaxed postfix).
Drivers are definitely using these __raw_ accessors, and from a quick
look, they do appear to be hoping that *mb() is going to order access for
them.
next prev parent reply other threads:[~2007-08-22 3:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 2:11 [patch 1/2] powerpc: rmb fix Nick Piggin
2007-08-21 2:16 ` [patch 1/2] powerpc: smp_wmb speedup Nick Piggin
2007-08-21 2:21 ` Nick Piggin
2007-08-21 19:07 ` [patch 1/2] powerpc: rmb fix Joel Schopp
2007-08-21 19:43 ` Segher Boessenkool
2007-08-21 21:42 ` Linas Vepstas
2007-08-22 1:16 ` Nick Piggin
2007-08-22 3:29 ` Segher Boessenkool
2007-08-22 3:55 ` Nick Piggin
2007-08-23 17:57 ` Segher Boessenkool
2007-08-24 2:47 ` Nick Piggin
2007-08-22 3:15 ` Nick Piggin [this message]
2007-08-22 3:33 ` Segher Boessenkool
2007-08-22 4:05 ` Nick Piggin
2007-08-23 17:49 ` Segher Boessenkool
-- strict thread matches above, loose matches on Subject: below --
2008-05-21 14:10 Nick Piggin
2008-05-21 15:27 ` Benjamin Herrenschmidt
2008-05-21 15:32 ` Nick Piggin
2008-05-21 15:43 ` Benjamin Herrenschmidt
2008-05-23 2:14 ` Paul Mackerras
2008-05-23 4:40 ` Nick Piggin
2008-05-23 4:53 ` Paul Mackerras
2008-05-23 5:48 ` Nick Piggin
2008-05-23 6:40 ` Paul Mackerras
2008-05-26 1:38 ` Nick Piggin
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=20070822031506.GA26374@wotan.suse.de \
--to=npiggin@suse.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).