mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "David S. Miller" <davem@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: The IO problem on multiple PCI busses
Date: Thu, 1 Mar 2001 21:09:16 +0100	[thread overview]
Message-ID: <19350124134100.15285@smtp.wanadoo.fr> (raw)
In-Reply-To: <15006.42475.79484.578530@pizda.ninka.net>
In-Reply-To: <15006.42475.79484.578530@pizda.ninka.net>

>As a side note, Alpha has a special PCI syscall to get the "PCI
>controller number" a given PCI device is behind.  We could add
>another ioctl number which does the same thing on /proc/bus/pci/*/*
>nodes.  This way sparc64 and Alpha could have the same user visible
>API for this as well.

And on PPC too since I adapted the pci controller mecanism to
it in 2.4.

In fact, all that is done by our various syscalls could be done by
ioctl's on /proc/bus/pci/*/*.

To be generic, the pci controller number should rather be the pci bus
number of the host bridge (the top of the PCI tree a given device lives
on). The internal controller numbers have no real meaning I think to
userland.

Also, an ioctl to retreive the iobase would be useful too (in addition
to the mmap), especially for getting access to VGA IOs associated with a
given PCI card, but also for whatever test tool one would want to write
in userland that access legacy IOs on a given PCI bus.
Having the mmap is fine, but I like having also the ability to retreive
all the informations via an ioctl too. 

I beleive that if we can agree on the in-kernel format of the PCI
controller structure and function to retreive it from a bus number, we
can make this generic.

For us, the pci controller requires at least an iobase (physical &
virtual as we always ioremap the IO space during boot) for generating
io cycles, the config ops, the mem offset (some platforms don't have
a 1:1 mapping of memory cycles vs. CPU bus cycles for PCI memory, for
example, on PReP, you write to physical c0000000 to get a PCI memory
write to 00000000). And finally the isa memory base (it may be located
differently, some bridge have 1:1 mappings and so allow only high
memory addresses to go to the PCI, but do open a "window" at a different
physical address to generate ISA memory cycles (low address cycles)).

Finally, we have some private datas (pointer to OF node for example),
the resource structures (so that we know what a given host bridge can
decode and can allocate unallocated PCI resources properly).

I'm not familiar with the requirements of other archs however.

Ben.

  parent reply	other threads:[~2001-03-01 20:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 15:33 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:09     ` Benjamin Herrenschmidt [this message]
2001-03-01 20:22     ` David S. Miller
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
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
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=19350124134100.15285@smtp.wanadoo.fr \
    --to=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 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®