Subject: Re: Refactoring MI devices in GENERIC and friends
To: Jachym Holecek <freza@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 09/09/2007 15:00:18
--KhDKIZ8emI+Lr8f6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Sep 09, 2007 at 01:55:56PM +0200, Jachym Holecek wrote:
> # Joerg Sonnenberger 2007-09-08:
> > My suggestion is that all MI drivers for PCI, Cardbus, USB and PCMCIA
> > (devices, not necessarily controllers) are collected from i386 and
> > amd64's GENERIC kernels and added to
> > src/sys/conf/std.{pci,cardbus,usb,pcmcia}. The direct lists of i386 and
> > amd64 kernels will refer to those with a possible exception for space
> > limited install kernels. Other platforms should be converted by the
> > portmaster.
>=20
> I like the general idea, but I don't think it should be fixed by
> maintaining yet another file. What you (seem to) really want is a
> config(1) extension like:
>=20
>   # Fabricate wildcarded instance for any driver capable of attaching
>   # at "pci" attribute (using the proper attachment of course).
>   any pci
>=20
> This should be fairly easy to implement and the 'no foo' feature gives
> you a way to avoid borken drivers. Rationale for this approach is that
> config(1) already knows about all drivers/attachments/attributes via
> files.* lists (included normally via std.${arch}), so we might just as
> well make use of that instead of doing the work manually.
>=20
> What do you think?

Firstly, this will only work with direct config buses.  Secondly, it
just makes it harder to understand what's going on.  Adding more and
more magic in config(5) will not help maintaining anything in the long
run, at least not for kernels meant to be used (and possibly changed)
by users.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--KhDKIZ8emI+Lr8f6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRuPuYtgoQloHrPnoAQJfkAf/YW86WXB0Ri6M1hZK6DVrQV8NBvAtd9OX
GPKZSDCZgkctC+CKMym2yPZoJMdWjZRUZDumsyakNAA5gFmN0ckyjSXeEStPJrTv
t+3eplljTRTF3zVM7GZfwXdE+ocOPauH/pOGGYEhPKVXFEvBZhpYAV6RrwijXwzq
ZvWZApUBtcRNaS3dCTX0D/9mEO8p1NuQ5tBKJF62X5knp8o1HkFLG+C8h8y6+RJw
gYCmddeHdjhKqJhGenfUbKdlZk4Z+JW6vqLRuODqphLjfrMqQzaPcUaRi2QtYd6s
IhgU0RV64gC4PvKyOCmkujrZ6jTA9OuvrIfkn5dLojIRY3SkhV0O5Q==
=/SKl
-----END PGP SIGNATURE-----

--KhDKIZ8emI+Lr8f6--