Re: Removal of pci_find_* in 2.5

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Sat Jul 13 2002 - 10:37:36 EST


Alan Cox wrote:
> On Sat, 2002-07-13 at 05:41, Jeff Garzik wrote:
>
>>ordering, is simply hard-coding something that should really be in
>>userspace. Depending on pci_find_device logic / link order to
>>still-boot-the-system after adding new hardware sounds like an
>>incredibly fragile hope, not a reliable system users can trust.
>
>
> For hot plugging obvious. At system boot time however the ordering and
> seeing the ordering is rather important because in many cases the
> ordering is what tells you about things like IDE controller pairing. It
> tells you what order to assign many scsi devices because the ordering is
> defined by their BIOS ROM.
>
> One way to handle this generically would be to use pci_register_device,
> but in the register function for such wacky devices during boot up we
> merely keep track of what we have to look into.

My point is that depending on any method of internal kernel ordering is
fragile.

I would rather have the kernel export which drives are listed in CMOS /
BIOS ROM, and let userspace say "my boot drive is the nth BIOS-listed
drive." For example, looking through the aic7xxx (or was it
ncr53c8xxx?) drive, it gets boot drive ordering from BIOS/CMOS. That
piece of info can either be exported by driverfs from the low-level SCSI
driver, or by a separate, tiny ncr53c8xxx_boot_drive driver.

Depending on pci_find_* ordering is very situation-dependent, and only
covers N cases. Then you have another N cases covered by the order in
which you modprobe key drivers. Then you have another N cases covered
by special case code somewhere. You'll never get all these cases right,
in the kernel, the way the user wants. That's why I say the
responsibility for figuring out the boot drive should be pushed to
initrd/initramfs.

        Jeff

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



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:26 EST