cvs commit: src/sys/i386/conf GENERIC src/sys/amd64/conf GENERIC

M. Warner Losh imp at bsdimp.com
Thu Mar 17 11:57:08 PST 2005


On Wednesday 16 March 2005 05:37 pm, Bruce Evans wrote:
> Are the comments on precedence even correct?  I think precedence
> according to ordering in the config file hasn't worked for many years.

That is correct.  At most you get hints ordering for ISA devices.
Otherwise, you get the order which the devices appear in the linked
lists for a given bus.

In message: <200503171058.04786.peter at wemm.org>
            Peter Wemm <peter at wemm.org> writes:
: The bubble sorting of the sysinit entries would scramble their registration 
: order with newbus, so it isn't safe to assume *any* implied order or 
: precedence.

Yes.  However, given that the two modules in question return relative
values such that either or both can be in the kernel and pcn wins.  So
it just doesn't matter what order you list have in your kernel
config.  The probe routines will bid on it, and they are safe to be
called multiple times, and only the highest bidder will attach.

: If there are any remnants of probe precedence, it is in the order
: specified in device.hints for old isa devices, but even then, I'm
: not sure that it has any effect.  The "correct" (for a small value
: thereof) way to specify precedence is with the sensitive flags in
: the drivers.

There are no such probing precidence vestiages left in the system.
However, given how hints are written, and that we prefer hinted
devices to pnp devices, on the ISA bus one can generally control the
order in which devices probe.

It looks like we don't look at the sensitive flag in the hint driver.

: The only other dependable order of probling is that isa probes happen after 
: pci/eisa/etc probes.  A pci probe will always get a chance to grab a device 
: before an isa probe even gets a chance to look at it.  Again, regardless of 
: the order in config files.

True.  And unless the PCI device is in some wacked out compatbility
mode, the ISA probe will never ever see that device, no matter when it
happens.  Well, if you hinted a pci device as an ISA device, you might
run into trouble, but nobody does that[*].

I don't have an opinion on where lnc should go.  It is clear to me
that it is fine where it is.  I cite as evidence:
	(1) ed is in the ISA section, but has pccard, cbus and pci
	    attachments.
	(2) ex, cs, and sn are in the ISA section, but also have
	    pccard attachments.
	(3) ep also has pccard, cbus and eisa attachments.
	(4) xe doesn't even have an ISA attachment, but is in the ISA
	    section
	(5) fe has pccard and cbus attachments (and could in theory
	    have EISA attachments).
	(6) le shouldn't be listed as using the old isa shims, since
	    those are gone from the tree.

Warner

[*] I'm sure someone will tell me they've been using this technique to
keep their old whatsit card that has only and ISA but no PCI
attachment going since 1.1, but I kinda doubt it.


More information about the cvs-all mailing list