Re: [PATCH] Serial driver size reducing (2.3.29)

Jeff Garzik (jgarzik@mandrakesoft.com)
Fri, 10 Dec 1999 22:44:11 -0500


Keith Owens wrote:
> I worry that some code currently marked as __init might be incorrect
> for modules. In a monolithic kernel, all initialization is done once
> only. But for modules, a high level module can be loaded, unloaded and
> reloaded. Each time it is loaded it can call the lower module's
> initilization code which prevents the lower level module using __init.
> See ethdev_init() in 8390.c for an example. All module code would have
> to be checked for breakage on second and subsequent loads.

I don't see where this is a problem. API functions, ie. those that will
get called from other modules, are broken if they are marked __init.
>From what I've seen, converting various modules to use the new
module_init/exit, there have not been any problems with overzealous
__init usage. The problem is generally completely lack of __init{data}
usage.

The behavior and logic of __init{data}-related code should be exactly
the same, whether code is compiled as a module vs. compiled into the
kernel.

-- 
Jeff Garzik              | Just once, I wish we would encounter
Building 1024            | an alien menace that wasn't immune to
MandrakeSoft, Inc.       | bullets.   -- The Brigadier, "Dr. Who"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/