Messages in this thread | | | Date | Mon, 7 Jan 2002 11:19:06 -0800 (PST) | From | Patrick Mochel <> | Subject | Re: Hardware Inventory [was: Re: ISA slot detection on PCI systems?] |
| |
On Mon, 7 Jan 2002, Greg KH wrote:
> On Mon, Jan 07, 2002 at 07:11:03PM +0100, Dave Jones wrote: > > On Mon, 7 Jan 2002, Patrick Mochel wrote: > > > > > One of the ideas that I've kicked around with some people here and the > > > ACPI guys is the notion of trigger device enumeration from userspace > > > completely. > > > > > > During the initramfs stage, a program (say devmgr) figures out what type > > > of system you have, where the PCI buses are, etc. It tells the kernel this > > > information, which then probes for existence, then loads drivers. > > > > Sounds remarkably like the work that Greg has been doing with hotplug > > support. > > Yup :) > > But I wanted to rely on the existing PCI and USB core code to do the > probing of the busses and devices, as it knows how to do this the best > right now. Whenever it finds a new device it calls out to /sbin/hotplug > with the device info. The userspace program at that location then loads > the proper driver for the device, if it knows about it. This is the > same code and process that runs when the kernel is up and running today. > No code duplication is a good thing :) > > And the /sbin/hotplug program knows about _all_ devices that the > currently compiled kernel can handle due to the MODULE_DEVICE_TABLE tags > in the drivers. > > See the linux-hotplug project's documentation for more info on this: > http://linux-hotplug.sf.net/ > A paper and presentation about the linux-hotplug process: > http://www.kroah.com/linux/ > > dietHotplug, a _very_ tiny implementation of /sbin/hotplug which is was > created exactly for the initramfs stage: > http://www.kernel.org/pub/linux/utils/kernel/hotplug/diethotplug-0.3.tar.gz
It's very closely related; kinda like kissing cousins.
/sbin/hotplug is called from the kernel only, right?
I see no reason to change that at all for notification of devices that are plugged in/removed by suprise.
I was thinking, though, more along the lines of triggering the probe for devices that the kernel has a tough time finding on its own. E.g. peer Host/PCI bridges, batteries, etc.
-pat
- 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/
| |