public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: PCI MMIO flushing, write-combining etc
Date: 19 Aug 2002 13:57:29 +0200	[thread overview]
Message-ID: <m3y9b3qcwm.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <1029496355.31514.44.camel@irongate.swansea.linux.org.uk>

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> > I understand writes to PR1 can be reordered, merged, and delayed.
> > What should I do to flush the write buffers? I understand reading from
> > PR1 would do. Would reading from NPR2 flush PR1 write buffers?
> > Would writing to NPR2 flush them?
> 
> That one I can't actually remember.

Ok. What PCI spec 2.1 says is, basically, that we don't need to worry about
such things. Writes can't be reordered - all the reads and writes are
in CPU (or any other PCI master) order, exactly as on ISA.
Writes can be merged on prefetchable region (so we don't necessarily want
to mark I/O MMIO as prefetchable, if the hardware doesn't like merging).

All writes can be posted, and they are flushed before a read initiated
by the same master (i.e. CPU) reaches the same PCI target (so it's enough
to readl() any region, either I/O or MMIO). Looks like we only need to
flush posted writes when there are specific timing requirements (something
like writel(reset); sleep 100 ns, writel(no_reset) - or when we want to be
sure that, say, card interrupts are off when we do something critical
elsewhere).
-- 
Krzysztof Halasa
Network Administrator

      reply	other threads:[~2002-08-19 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 23:45 PCI MMIO flushing, write-combining etc Krzysztof Halasa
2002-08-16 11:12 ` Alan Cox
2002-08-19 11:57   ` Krzysztof Halasa [this message]

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=m3y9b3qcwm.fsf@defiant.pm.waw.pl \
    --to=khc@pm.waw.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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