Bjorn Helgaas wrote::) I don't know of any specific documentation, but it's pretty easy: Devices, any kind of device, can export a match, based on specific properties of the subsystem it belongs to. In most cases its the same propery/id that is used inside the kernel, to find a (already loaded) driver which will bind this device. Any unique string, hardware ID's, whatever, are stuffed into a modalias, prefixed by "<subsystem>:" to be unique. PCI and USB are pretty obvious, they just stuff all their hardware ID'S into a string, in a defined order, and let every device export that value to userspace by MODALIAS environment key and the "modalias" sysfs file. Other subsystem may have simple strings to match, they define themselves. Now, the drivers contain "match id tables" which are used by the core to bind devices to drivers. These tables area made available to file2alias.c in the module postprocessing, and will end up in the module file itself. The string is mangled to contain wildcards, so they can just be fnmatch()'d against the modalias value, which the devices export. The string embedded in the modules are extracted by depmod, and put into the modules.aliases file in /lib/modules/. Every time modprobe is called with an alias, it searches through this file and loads all modules which contained a matching alias string. Udev does nothing but stupidly running modprobe for every device which contains MODALIAS in the event environment, and passes $MODALIAS as an argument to modprobe. That's basically the whole module autoloading today. :) That's where the MODALIAS environment value is composed, yes. Only if we would change the format of the aliases. Yeah, they are all exported by acpi too. Yeah, that's what we want to kill. :) Only if we change the format of the current pnp device aliases to something like: pnp*:XYZ2324:* pnp*:ABC1234:* and create a "modalias" file at every pnp device, and add MODALIAS to the uevent. The modalias must contains all ID's which belong to that device in one single string, separated and terminated by a special character, something like: pnp:ABC1234:XYZ2324:RST3445: That's how acpi should work with this patch now. Kay --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| David Newall | Re: Slow DOWN, please!!! |
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
git: | |
