kobj multiple inheritance

Doug Rabson dfr at nlsystems.com
Mon Sep 22 02:10:52 PDT 2003


I believe that I have the kobj multiple inheritance changes about ready
for committing now. I have locked up the class handling in kobj and I've
re-done the method dispatch so that it is MP-safe without needing locks
(I would appreciate a close look at that part by another pair of eyes).
You can get the current state of this patch at
http://people.freebsd.org/~dfr/kobj-mi-22092003.diff.

I've included in this patch a couple of uses of the two main new
features. I have changed the cardbus driver so that it derives from the
pci driver. This allows many pci methods to be removed from the cardbus
method table and should allow many of those methods to be staticised in
the pci driver again.

I have also edited a bunch of pci drivers with explicit cardbus
attachments so that they just list as pci drivers (where the cardbus
attachment is identical to the pci attachment). This demonstrates the
other inheritance feature which searches for drivers in both the bus
devclass and the bus devclass' parent. This effectively allows all pci
drivers to get into the cardbus probe. If a particular driver needs to
treat its cardbus attachment specially, it can still do this by adding a
special cardbus driver (e.g. with a cardbus specific probe or attach
method) to the cardbus devclass (exactly as it does now).



More information about the freebsd-arch mailing list