Re: unkown PCI device

Torsten Landschoff (
Mon, 30 Nov 1998 18:37:09 +0100

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 29, 1998 at 12:00:01PM +0100, Martin Mares wrote:
> Hello,

Hi Martin,=20

> Yes, there never should have been /proc/pci and if there is, it wasn't=
> intended to be parsed by programs. There is _no_ exact format specificati=
on you
> can rely on when writing a parser. It's The Maintainer's Nightmare -- wh=
> doing any changes (including bug fixes), you never know what application
> attempting to parse it will the changes break. And it consumes about 16K=
B of
> precious kernel memory and this amount would be increasing for ever if I =
> decide not to synchronize the tables with master PCI ID list any more. As=
> >from that, the present implementation breaks on machines with lots of
> PCI devices (it just runs out of buffers and truncates the list).

You are right. But I like this /proc/pci-Interface because I can boot from a
floppy disk without any driver to get a list of installed PCI-devices. That=
way cool :)

Why are the /proc/bus/pci-entries binary? Probably because of efficiency bu=
t I
really like to read values from /proc with cat...

> > One common complaint about Linux is that is changes too often.
> > This wouldn't be just a new version freaking out a PHB, but a real
> > incompatible change.
> Nobody knows what applications will break -- maybe only some ancient
> X server, maybe more. I've attempted to identify such applications
> by printing a warning message when they try to open /proc/pci.
> If only stone-age X servers will break, the right solution is probably
> a preload-library replacing open(). If there are more such applications,
> we can solve it easily by making /proc/pci a link to /var/run/proc-pci
> in the kernel and creating a utility generating this file. But in all
> cases, I'll do my best to keep this thing outside the kernel.

Wouldn't it be possible to do this with a tool like kerneld? So you had a v=
small binary (say 2K) and a datafile to have the /proc/pci-functionality.

> > It's not even a change we need for standards
> > compliance. If /proc/pci somehow impedes development, please explain.
> As mentioned above, it is unmaintainable and it probably isn't worth
> of the 16KB of kernel memory just for sake of few prehistoric apps. (Anyw=
> you can keep it a configurable feature, but it would probably mean all the
> distribution makers will leave it compiled in as they do now.)

Yes - and of course 16KB will not be enough for all times...


Content-Type: application/pgp-signature

Version: 2.6.3ia



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at