From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: davem@redhat.com (David S. Miller)
Cc: jgarzik@mandrakesoft.com (Jeff Garzik),
tom_gall@vnet.ibm.com (Tom Gall),
linux-kernel@vger.kernel.org
Subject: Re: Going beyond 256 PCI buses
Date: Thu, 14 Jun 2001 14:01:03 -0400 (EDT) [thread overview]
Message-ID: <200106141801.f5EI13s413231@saturn.cs.uml.edu> (raw)
In-Reply-To: <15144.51504.8399.395200@pizda.ninka.net> from "David S. Miller" at Jun 14, 2001 07:24:48 AM
David S. Miller writes:
> Jeff Garzik writes:
>> According to the PCI spec it is -impossible- to have more than 256
>> buses on a single "hose", so you simply have to implement multiple
>> hoses, just like Alpha (and Sparc64?) already do. That's how the
>> hardware is forced to implement it...
>
> Right, what userspace had to become aware of are "PCI domains" which
> is just another fancy term for a "hose" or "controller".
>
> All you have to do is (right now, the kernel supports this fully)
> open up a /proc/bus/pci/${BUS}/${DEVICE} node and then go:
>
> domain = ioctl(fd, PCIIOC_CONTROLLER, 0);
>
> Viola.
>
> There are only two real issues:
No, three.
0) The API needs to be taken out and shot.
You've added an ioctl. This isn't just any ioctl. It's a
wicked nasty ioctl. It's an OH MY GOD YOU CAN'T BE SERIOUS
ioctl by any standard.
Consider the logical tree:
hose -> bus -> slot -> function -> bar
Well, the hose and bar are missing. You specify the middle
three parts in the filename (with slot and function merged),
then use an ioctl to specify the hose and bar.
Doing the whole thing by filename would be better. Else
why not just say "screw it", open /proc/pci, and do the
whole thing by ioctl? Using ioctl for both the most and
least significant parts of the path while using a path
for the middle part is Wrong, Bad, Evil, and Broken.
Fix:
/proc/bus/PCI/0/0/3/0/config config space
/proc/bus/PCI/0/0/3/0/0 the first bar
/proc/bus/PCI/0/0/3/0/1 the second bar
/proc/bus/PCI/0/0/3/0/driver info about the driver, if any
/proc/bus/PCI/0/0/3/0/event hot-plug, messages from driver...
Then we have arch-specific MMU cruft. For example the PowerPC
defines bits that affect caching, ordering, and merging policy.
The chips from IBM also define an endianness bit. I don't think
this ought to be an ioctl either. Maybe mmap() flags would be
reasonable. This isn't just for PCI; one might do an anon mmap
with pages locked and cache-incoherent for better performance.
> 1) Extending the type bus numbers use inside the kernel.
...
> 2) Figure out what to do wrt. sys_pciconfig_{read,write}()
...
next prev parent reply other threads:[~2001-06-14 18:01 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-13 10:02 Going beyond 256 PCI buses Tom Gall
2001-06-13 17:17 ` Albert D. Cahalan
2001-06-13 18:29 ` Tom Gall
2001-06-14 14:14 ` Jeff Garzik
2001-06-14 15:15 ` David S. Miller
2001-06-14 17:59 ` Jonathan Lundell
2001-06-14 20:50 ` Jonathan Lundell
2001-06-14 14:24 ` David S. Miller
2001-06-14 14:32 ` Jeff Garzik
2001-06-14 14:42 ` David S. Miller
2001-06-14 15:29 ` Jeff Garzik
2001-06-14 15:33 ` Jeff Garzik
2001-06-14 18:01 ` Albert D. Cahalan [this message]
2001-06-14 18:47 ` David S. Miller
2001-06-14 19:04 ` Albert D. Cahalan
2001-06-14 19:12 ` David S. Miller
2001-06-14 19:41 ` Jeff Garzik
2001-06-14 19:57 ` David S. Miller
2001-06-14 20:08 ` Jeff Garzik
2001-06-14 20:14 ` David S. Miller
2001-06-14 21:30 ` Benjamin Herrenschmidt
2001-06-14 21:46 ` Jeff Garzik
2001-06-14 21:48 ` David S. Miller
2001-06-14 21:57 ` Benjamin Herrenschmidt
2001-06-14 22:12 ` David S. Miller
2001-06-14 22:29 ` Benjamin Herrenschmidt
2001-06-14 22:49 ` David S. Miller
2001-06-14 23:35 ` Benjamin Herrenschmidt
2001-06-14 23:35 ` VGA handling was [Re: Going beyond 256 PCI buses] James Simmons
2001-06-14 23:42 ` David S. Miller
2001-06-14 23:55 ` James Simmons
2001-06-15 15:14 ` Pavel Machek
2001-06-15 2:06 ` Albert D. Cahalan
2001-06-15 8:52 ` Matan Ziv-Av
2001-06-14 21:35 ` Going beyond 256 PCI buses David S. Miller
2001-06-14 21:46 ` Benjamin Herrenschmidt
2001-06-16 21:32 ` Jeff Garzik
2001-06-16 23:29 ` Benjamin Herrenschmidt
2001-06-15 8:42 ` Geert Uytterhoeven
2001-06-15 15:38 ` David S. Miller
2001-06-14 19:03 ` David S. Miller
2001-06-14 20:56 ` David S. Miller
2001-06-14 15:13 ` Jonathan Lundell
2001-06-14 15:17 ` Jeff Garzik
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=200106141801.f5EI13s413231@saturn.cs.uml.edu \
--to=acahalan@cs.uml.edu \
--cc=davem@redhat.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tom_gall@vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).