From: David Mosberger <davidm@napali.hpl.hp.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: davidm@hpl.hp.com, Bjorn Helgaas <bjorn.helgaas@hp.com>,
linux-ia64@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: ia64 implementation of lib/iomap.c
Date: Tue, 26 Oct 2004 16:26:06 +0000 [thread overview]
Message-ID: <16766.31390.547604.110767@napali.hpl.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0410260807080.28839@ppc970.osdl.org>
>>>>> On Tue, 26 Oct 2004 08:21:15 -0700 (PDT), Linus Torvalds <torvalds@osdl.org> said:
Linus> So historically, on x86, an IO port access would be totally
Linus> synchronous, in that a outb() will actually _wait_ for the
Linus> out to hit the bus. Quite frankly, I don't think most other
Linus> architectures ever implemented this even for IO ports, and we
Linus> should not even _try_ to do so for io_writeX().
Well, ia64 does. It's precisely what "mf.a" gives you:
[mf.a] prevents any subsequent data memory accesses by the processor
from initiating transactions to the external platform until:
o all prior loads to sequential pages have returned data, and
o all prior stores to sequential pages have been accepted by
the external platform
(sequential pages are basically pages mapped uncached). We use this
to emulate INx/OUTx semantics via memory-mapped I/O.
By your argument, it should be safe to drop the "mf.a" from the I/O
port-based writes.
OTOH, I'm not sure its worth the bother: if you have an I/O device
that does lots of pokes through I/O port space, it's gonna be slow no
matter what and the extra 1000 or so cycles the CPU stalls may not
make any difference (even though it would make any compiler-writer
cringe! ;-). Also, if x86 gives stronger ordering guarantees, suspect
there is _some_ broken driver out there that may rely on that
property, so it may just be safer to leave the "mf.a" there.
--david
next prev parent reply other threads:[~2004-10-26 16:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 14:34 ia64 implementation of lib/iomap.c David Mosberger
2004-10-21 17:34 ` Bjorn Helgaas
2004-10-21 17:38 ` David Mosberger
2004-10-25 16:48 ` Bjorn Helgaas
2004-10-26 7:48 ` David Mosberger
2004-10-26 15:21 ` Linus Torvalds
2004-10-26 16:26 ` David Mosberger [this message]
2004-10-26 16:23 ` Jesse Barnes
2004-10-26 17:06 ` Linus Torvalds
2004-10-26 17:49 ` Jesse Barnes
2004-10-26 17:55 ` Grant Grundler
2004-10-26 18:05 ` Grant Grundler
2004-10-26 18:12 ` Grant Grundler
2004-10-26 18:19 ` Jesse Barnes
2004-10-26 18:37 ` 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=16766.31390.547604.110767@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=bjorn.helgaas@hp.com \
--cc=davidm@hpl.hp.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=torvalds@osdl.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