mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Jesse Barnes <jbarnes@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jesse Barnes <jbarnes@engr.sgi.com>,
	akpm@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
	jgarzik@pobox.com, gnb@sgi.com, akepner@sgi.com
Subject: Re: [PATCH] use mmiowb in tg3.c
Date: Fri, 22 Oct 2004 14:00:35 +1000	[thread overview]
Message-ID: <16760.34275.675065.538997@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <200410212201.35430.jbarnes@sgi.com>

Jesse Barnes writes:

> On Thursday, October 21, 2004 6:40 pm, David S. Miller wrote:
> > On Thu, 21 Oct 2004 16:28:06 -0700
> >
> > Jesse Barnes <jbarnes@engr.sgi.com> wrote:
> > > This patch originally from Greg Banks.  Some parts of the tg3 driver
> > > depend on PIO writes arriving in order.  This patch ensures that in two
> > > key places using the new mmiowb macro.  This not only prevents bugs (the
> > > queues can be corrupted), but is much faster than ensuring ordering using
> > > PIO reads (which involve a few round trips to the target bus on some
> > > platforms).
> >
> > Do other PCI systems which post PIO writes also potentially reorder
> > them just like this SGI system does?  Just trying to get this situation
> > straight in my head.
> 
> The HP guys claim that theirs don't, but PPC does, afaik.  And clearly any 
> large system that posts PCI writes has the *potential* of reordering them.

No, PPC systems don't reorder writes to PCI devices.  Provided you use
inl/outl/readl/writel et al., all PCI accesses from one processor are
strictly ordered, and if you use a spinlock, that gives you strict
access ordering between processors.

Our barrier instructions mostly order cacheable accesses separately
from non-cacheable accesses, except for the strongest barrier
instruction, which orders everything.  Thus it would be useful for us
to have an explicit indication of when a cacheable write (i.e. to main
memory) has to be completed (from a PCI device's point of view) before
a non-cacheable device read or write (e.g. to kick off DMA).

Paul.

  reply	other threads:[~2004-10-22  3:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 23:13 [PATCH] I/O space write barrier Jesse Barnes
2004-10-21 23:17 ` [PATCH] use mmiowb in qla1280.c Jesse Barnes
2004-10-22  9:53   ` Jes Sorensen
2004-10-24 16:20   ` James Bottomley
2004-10-25 16:18     ` Jesse Barnes
2004-10-25 19:02       ` Andrew Morton
2004-10-25 19:33         ` Jesse Barnes
2004-10-21 23:28 ` [PATCH] use mmiowb in tg3.c Jesse Barnes
2004-10-21 23:40   ` David S. Miller
2004-10-22  1:16     ` Benjamin Herrenschmidt
2004-10-22  1:33       ` akepner
2004-10-22  2:07         ` Benjamin Herrenschmidt
2004-10-22  3:01     ` Jesse Barnes
2004-10-22  4:00       ` Paul Mackerras [this message]
2004-10-22 20:51   ` [PATCH] use mmiowb in tg3_poll akepner
2004-10-22  1:01 ` [PATCH] I/O space write barrier Grant Grundler
2004-10-22  3:05   ` Jesse Barnes
2004-10-22  4:26     ` Greg Banks
2004-10-22 15:26     ` Grant Grundler

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=16760.34275.675065.538997@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akepner@sgi.com \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=gnb@sgi.com \
    --cc=jbarnes@engr.sgi.com \
    --cc=jbarnes@sgi.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.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

all inboxes | Powered by JetHome®