Re: unkown PCI device

Torsten Landschoff (t.landschoff@gmx.net)
Mon, 30 Nov 1998 18:37:09 +0100


--p8PhoBjPxaQXD0vg
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=
ever
> 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=
en
> 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 =
didn't
> decide not to synchronize the tables with master PCI ID list any more. As=
ide
> >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=
's
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.
>=20
> 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.
>=20
> 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=
ery
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.
>=20
> 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=
ay,
> 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...

cu
Torsten

--p8PhoBjPxaQXD0vg
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBNmLXwjOIZYDCgaKlAQF30QP/YylicrgFX5JssmEK1HB2kDNPomcH1BV+
CM4xSp71InMP+M5h9TePghZnW3SmVu9I/jge1Zo6WdUW1JrkD1nQez1Wx4XsDbnL
oWOHD0nWcUhWfhz387lzjGr+zv33KUkebOWrv6JO/NShrUdR0usmqhGtbwWnsOEu
rQQY6ytKePQ=
=8DjJ
-----END PGP SIGNATURE-----

--p8PhoBjPxaQXD0vg--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/