public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* getting rid of inter_module_xx
@ 2004-10-22 17:08 Jon Smirl
  2004-10-23  9:44 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Smirl @ 2004-10-22 17:08 UTC (permalink / raw)
  To: lkml

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.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: getting rid of inter_module_xx
  2004-10-22 17:08 getting rid of inter_module_xx Jon Smirl
@ 2004-10-23  9:44 ` Christoph Hellwig
  2004-10-24 16:27   ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2004-10-23  9:44 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Fri, Oct 22, 2004 at 01:08:08PM -0400, Jon Smirl wrote:
> 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.

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: getting rid of inter_module_xx
  2004-10-23  9:44 ` Christoph Hellwig
@ 2004-10-24 16:27   ` Alan Cox
  2004-11-28 22:06     ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2004-10-24 16:27 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jon Smirl, lkml

On Sad, 2004-10-23 at 10:44, Christoph Hellwig wrote:
> 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: getting rid of inter_module_xx
  2004-10-24 16:27   ` Alan Cox
@ 2004-11-28 22:06     ` Rusty Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2004-11-28 22:06 UTC (permalink / raw)
  To: Alan Cox; +Cc: Christoph Hellwig, Jon Smirl, lkml - Kernel Mailing List

On Sun, 2004-10-24 at 17:27 +0100, Alan Cox wrote:
> On Sad, 2004-10-23 at 10:44, Christoph Hellwig wrote:
> > 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.
> 
> 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.

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.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-28 22:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 17:08 getting rid of inter_module_xx Jon Smirl
2004-10-23  9:44 ` Christoph Hellwig
2004-10-24 16:27   ` Alan Cox
2004-11-28 22:06     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox