getting rid of inter_module_xx
I'm looking at getting rid of DRM's use of inter_module_xx. DRM makes use of this to locate and use the AGP module. AGP is an optional module since some system only have PCI graphics.
Right now DRM uses inter_module_get("AGP") to locate the module if it exists. It then changes behavior if this call secedes or fails.
If I remove inter_module_get("AGP") and use the symbols directly, such as agp_backend_acquire(), how do I resolve the symbol link when AGP is not loaded? If the symbols link as NULL DRM will see that and act correctly.
Signature · 2 lines
Jon Smirl [email protected]
Quoted 11 lines · Jon Smirl
I'm looking at getting rid of DRM's use of
inter_module_xx. DRM makes use of this to locate and use the AGP module. AGP is an optional module since some system only have PCI graphics.Right now DRM uses
inter_module_get("AGP")to locate the module if it exists. It then changes behavior if this call secedes or fails.If I remove
inter_module_get("AGP")and use the symbols directly, such asagp_backend_acquire(), how do I resolve the symbol link when AGP is not loaded? If the symbols link as NULL DRM will see that and act correctly.
not at all. Everything else in the kernel is compile-time depencies. Just make the agp backend module mandatory if CONFIG_AGP is set, you'll lose tons of complexity at a minimum amount of used memory, and as an added benefit look like the rest of the kernel.
Quoted 4 lines · Christoph Hellwig
not at all. Everything else in the kernel is compile-time depencies. Just make the agp backend module mandatory if
CONFIG_AGPis set, you'll lose tons of complexity at a minimum amount of used memory, and as an added benefit look like the rest of the kernel.
Thats completely stupid
CONFIG_AGP enables the building of AGP modules, it does not disable the ability to run that kernel on non AGP setups, or to use non AGP video cards.
The relationship is dynamic and you'd need to fix the various drivers that support both PCI and AGP mode by compiling them twice so you can load them with or without agp support.
Yuck yuck yuck. It would instead be much saner to fix the module loader to support weak symbols.
Alan
Quoted 12 lines · Alan Cox
Quoted 4 lines · Christoph Hellwig
not at all. Everything else in the kernel is compile-time depencies. Just make the agp backend module mandatory if
CONFIG_AGPis set, you'll lose tons of complexity at a minimum amount of used memory, and as an added benefit look like the rest of the kernel.Thats completely stupid
CONFIG_AGPenables the building of AGP modules, it does not disable the ability to run that kernel on non AGP setups, or to use non AGP video cards.
Quoted 6 lines
The relationship is dynamic and you'd need to fix the various drivers that support both PCI and AGP mode by compiling them twice so you can load them with or without agp support.
Yuck yuck yuck. It would instead be much saner to fix the module loader to support weak symbols.
Well, we do support weak symbols, and we also support dynamic symbol resolution using symbol_get (or symbol_request which probes for the module if CONFIG_KMOD) and symbol_put.
It's just the inter_module* mechanism which I dislike. Rusty.
Signature · 1 line
A bad analogy is like a leaky screwdriver -- Richard Braakman