[lkml]   [2001]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Where did vm_operations_struct->unmap in 2.4.0 go?
> >> I ran into this while hacking the Nvidia kernel driver to work with
> >> 2.4.0. I got the driver working but it's not 100%
> >>
> >> Also where did get_module_symbol() and put_module_symbol() go?
> >
> >Patches for the NVIDIA binary X drivers following all these kernel
> >changes can be gotten from IRC server, channel
> >#nvidia. Or from
> And what a pile of crud those patches are!! Instead of using the clean
> replacement interface for get_module_symbol, nvidia/patch-2.4.0-PR hard
> codes the old get_module_symbol algorithm as inline code.
> This patch violates the modules interface by accessing modules.c
> internal data. It still suffers from all the problems that
> get_module_symbol had. Because it is hard coded as inline code instead
> of a common function, will be much harder to fix when it breaks.

The way I understand the inter_module mechanism, module A registers one
or several of its symbols using inter_module_register to make it or them
available to other modules. Module B can then request any of the symbols
with inter_module_request and get a pointer. The inter_module mechanism
guarantees that the symbol will be available until module B decides that
the symbol is no longer needed and releases it by calling inter_module_put.

Saying that I should have made use of this mechanism for the specific
code in the Nvidia driver that we are talking about clearly shows that
you didn't look at it. The module used get_module_symbol to search its
own symbol table for parameters that may have been passed to it at load
time. Arguably, this is bad practise, but it is also the reason why using
your mechanism doesn't make any sense. Obviously, the module wouldn't
want to register private data to request it later on; the information
that would have to be passed to inter_module_register is the same that
the code in question intends to retrieve in the first place.

Contrary to what you're saying, the patch does not just inline the old
get_module_symbol algorithm nor does it access any of module.c's internal
data. What is does is to browse the list of the modules's _own_ symbols
looking for a match. If it finds one, it returns the desired data.

> Whoever coded that patch should be taken out and shot, hung, drawn and
> quartered then forced to write COBOL for the rest of their natural
> life.

Excellent comment - it is just as appropriate as it is helpful.

christian zander we come to bury dos, not to praise it. -- paul vojta
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 13:28    [W:0.059 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site