lkml.org 
[lkml]   [2008]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Add EXPORT_INIT_SYMBOL()?
On Sat, Feb 02, 2008 at 02:52:22PM +0100, Sam Ravnborg wrote:
> While analysing some of the section mismatches reported
> by modpost I came to the conclusion that there
> was no good way to say that a certain function could
> both be annotated say __cpuinit and exported.
>
> One example is register_cpu_notifier() in kernel/cpu.c
> The function is annotated __cpuinit which is correct
> as this function is used only in the startup phase
> of a non HOTPLUG_CPU kernel and always available if
> CONFIG_HOTPLUG_CPU is equal 'y'.
>
> There are more examples in the tree - I have used
> register_cpu_notifier as an example.
>
> So that left me with the following choices:
> a) Drop the annotation of register_cpu_notifier()
> thus wasting memory and loosing the checks
> performed by modpost.
> b) Add a small helper function annotated __ref
> that would call the __cpuinit annotated
> __register_cpu_notifier()
> c) Drop all section mismatch checks for exported
> symbols expect those annotated with __init

For the record I have just committed a patch
to kbuild.git implmenting approach c)

If we need to change this later to something
more or less smart we can always do so.

Sam


\
 
 \ /
  Last update: 2008-02-02 23:41    [W:0.083 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site