public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: Jesse Barnes <jbarnes@engr.sgi.com>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	benh@kernel.crashing.org
Subject: Re: [PATCH] I/O space write barrier
Date: 04 Oct 2004 20:32:24 -0400	[thread overview]
Message-ID: <1096936344.2674.198.camel@cube> (raw)
In-Reply-To: <200410041420.01266.jbarnes@engr.sgi.com>

On Mon, 2004-10-04 at 17:20, Jesse Barnes wrote:
> On Monday, October 4, 2004 1:39 pm, Albert Cahalan wrote:
> > > diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h
> > > --- a/include/asm-ppc/io.h 2004-09-27 10:48:41 -07:00
> > > +++ b/include/asm-ppc/io.h 2004-09-27 10:48:41 -07:00
> > > @@ -197,6 +197,8 @@
> > >  #define memcpy_fromio(a,b,c)   memcpy((a),(void *)(b),(c))
> > >  #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
> > >
> > > +#define mmiowb() asm volatile ("eieio" ::: "memory")
> > > +
> > >  /*
> > >   * Map in an area of physical address space, for accessing
> > >   * I/O devices etc.
> >
> > I don't think this is right. For ppc, eieio is
> > already included as part of the assembly for the
> > IO operations. If you could delete that, great,
> > but I suspect that nearly all drivers would break.
> 
> Ok, if it's covered than mmiowb() can just be empty for ppc.

Ideally, it would be eieio, and the eieio in each
of the IO operations would be removed. Finding and
fixing all the drivers that break looks impossible
though; most driver developers will be on x86 boxes.

> > BTW, the "eieio" name is better. The "wb" part
> > of "mmiowb" looks like "write back" to me, as if
> > it were some sort of cache push operation. It is
> > also lacking an appropriate song. :-)
> 
> It's supposed to be 'write barrier' just like wmb is a write memory barrier, 
> so is mmiowb a memory-mapped I/O write barrier.  Make sense?

In that case: wmmiob

(or something longer, like mmio_write_fence maybe)

As a name, "wmb" sucks almost as much as "cli" and "sti" do.
It dates back to the Alpha port, where it's an opcode.



  reply	other threads:[~2004-10-05  0:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 20:39 [PATCH] I/O space write barrier Albert Cahalan
2004-10-04 21:20 ` Jesse Barnes
2004-10-05  0:32   ` Albert Cahalan [this message]
2004-10-05  1:22     ` Benjamin Herrenschmidt
2004-10-05  2:26       ` Jesse Barnes
2004-10-05  3:04         ` Benjamin Herrenschmidt
2004-10-05 15:33           ` Jesse Barnes
2004-10-05 22:41             ` Benjamin Herrenschmidt
2004-10-05 23:09               ` Jesse Barnes
2004-10-05 23:57               ` Roland Dreier
2004-10-06  1:45                 ` Benjamin Herrenschmidt
2004-10-05  2:33     ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2004-10-21 23:13 Jesse Barnes
2004-10-22  1:01 ` Grant Grundler
2004-10-22  3:05   ` Jesse Barnes
2004-10-22  4:26     ` Greg Banks
2004-10-22 15:26     ` Grant Grundler
2004-10-05 22:38 Jesse Barnes
2004-09-27 18:03 Jesse Barnes
2004-09-29 10:36 ` Greg Banks
2004-09-29 20:35   ` David S. Miller
2004-09-29 20:43     ` Jesse Barnes
2004-09-29 20:50       ` David S. Miller
2004-09-30  2:23         ` Greg Banks
2004-09-29 22:55 ` Jesse Barnes
2004-09-30  7:15   ` Jeremy Higdon
2004-09-30 21:21     ` Guennadi Liakhovetski
2004-10-16  0:38       ` Jeremy Higdon
2004-10-16  3:20         ` Matthew Wilcox
2004-10-16  3:31           ` Jeremy Higdon
2004-09-22 15:45 Jesse Barnes

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=1096936344.2674.198.camel@cube \
    --to=albert@users.sf.net \
    --cc=albert@users.sourceforge.net \
    --cc=benh@kernel.crashing.org \
    --cc=jbarnes@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.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