Subject: splitting pciide
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 09/19/2003 23:53:04
Hi,
I've been thinking about a way to exclude chip-specific code from pciide,
to be able to build smaller custom kernels (for example, the piix code
is probably useless for all but i386). pciide.c is already large (text is
47744 on sparc64), and can only grow.
I can see 2 solutions:
1) use kernel options and #ifdef.
2) split pciide in several smaller drivers.

1) is ugly, so if we want to do this it'll probably be 2)

For this, pciide will have to be splitted in a common set of functions,
and different chips-specific drivers (piixide, viaide, siside, etc ...)
There will also a generic pciide driver, as a catch-all driver.

As some controllers can't work with a generic pciide driver (e.g.
the software raid adapters which identifies themselves as raid, or
the cypress which has a special way of doing compat mode), the
GENERIC and INSTALL 386 kernels will still need to have all the drivers
(we can't use this to reduce the size of the i386 install media), but
it can be helpfull for non-i386 PCI architectures.

Comments ?

If we do this, I'd like to do it in the same time window as the atabus
change I proposed in another mail, to have only one major change to the
kernel config files.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--