All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@redhat.com>,
	linuxppc-dev@lists.linuxppc.org, linux-kernel@vger.kernel.org
Subject: Re: The IO problem on multiple PCI busses
Date: Sat, 03 Mar 2001 06:01:33 -0500	[thread overview]
Message-ID: <3AA0CF0D.CB9D544C@mandrakesoft.com> (raw)
In-Reply-To: <15008.17278.154154.210086@pizda.ninka.net> <19350125195650.22439@mailhost.mipsys.com>

Benjamin Herrenschmidt wrote:
> 
> >No, don't do this, it is evil.  Use mappings, specify the device
> >related info somehow when creating the mapping (in the userspace
> >variant you do this by openning a specific device to mmap, in the
> >kernel variant you can encode the bus/dev/etc. info in the device's
> >resource and decode this at ioremap() time, see?).
> 
> Well, except that drivers doing IOs don't ioremap...
> 
> Maybe we could define an ioremap-like function for IOs, but the more

I/O is not supposed to be fast, that's what MMIO is for. :)  Just do

void outb (u8 val, u16 addr)
{
	void *addr = ioremap (ISA_IO_BASE + addr);
	if (addr) {
		writeb (val, addr);
		iounmap (addr);
	}
}

You can map and unmap for each call :)  Ugly and slow, but hey, it's
I/O...

-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie

  reply	other threads:[~2001-03-03 11:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 15:33 The IO problem on multiple PCI busses Benjamin Herrenschmidt
2001-03-01 15:41 ` Benjamin Herrenschmidt
2001-03-01 18:30 ` Alan Cox
2001-03-01 19:09 ` David S. Miller
2001-03-01 19:33   ` Dan Malek
2001-03-01 19:41     ` David S. Miller
2001-03-01 19:59       ` Dan Malek
2001-03-01 20:22         ` David S. Miller
2001-03-01 20:09       ` Benjamin Herrenschmidt
2001-03-01 20:27         ` David S. Miller
2001-03-02 11:25           ` Benjamin Herrenschmidt
2001-03-03  1:08             ` David S. Miller
2001-03-01 19:49   ` Benjamin Herrenschmidt
2001-03-01 20:21     ` David S. Miller
2001-03-01 22:26       ` Alan Cox
2001-03-02 11:20       ` Benjamin Herrenschmidt
2001-03-03  1:06         ` David S. Miller
2001-03-03  2:25           ` Benjamin Herrenschmidt
2001-03-03 11:01             ` Jeff Garzik [this message]
2001-03-03 17:28               ` Benjamin Herrenschmidt
2001-03-05 16:20             ` David Woodhouse
2001-03-06 23:01           ` Oliver Xymoron
2001-03-07  2:07           ` Tony Mantler
2001-03-05 23:21   ` Chris Wedgwood
  -- strict thread matches above, loose matches on Subject: below --
2001-03-02  1:22 Grant Grundler
2001-03-02  2:19 ` David S. Miller
2001-03-02 17:46   ` 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=3AA0CF0D.CB9D544C@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.linuxppc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.