Re: /proc/pci

Teunis Peters (teunis@usa.net)
Mon, 22 Sep 1997 09:50:08 -0600 (MDT)


> teunis@usa.net said:
> > Okay fine. How _SHOULD_ a userspace program find a PCI card? (I'm
> > probably missing something here - I haven't really paid all that much
> > attention to this thread 'till now)
>
> Currently, there is no practical alternative. I think /proc/pci is incorrect,
> but I don't believe that there have been better alternatives. ... yet.

...

> rth@dot.cygnus.com said:
> > Note that that comment describes an old version of XF86_TGA. Current
> > versions use the pciconfig_read system call.
>
> This system call doesn't exist on all Linux platforms. Personally, I think
> that a new sytem call is inappropriate and that the proper thing to do is
> to choose/devise a good /proc based mechinism, or add a sysctl.

I'll agree there - the system speed isn't important enough to call for it.
Unless /proc is supposed to replace /dev, I'd rather /dev/pci personally.
(or /dev/pci0; /dev/pci1 .. for each bus)

On the flip side, /proc means that the SCSI-silliness (moving /sdX based
on which appeared first) won't happen.

G'day, eh?
- Teunis

FWIW system-specific stuff should _NEVER_ be sysctls.... (and PCI is
pretty system-specific - although it's on a lot of platforms so maybe its
a special case...).

We definitely need some kind of /proc and make sure it's fast though.
[pity we can't boot off of /proc/scsi/ID...]