From: Sam Ravnborg <sam@ravnborg.org>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Add EXPORT_INIT_SYMBOL()?
Date: Sat, 2 Feb 2008 23:39:17 +0100 [thread overview]
Message-ID: <20080202223917.GC27546@uranus.ravnborg.org> (raw)
In-Reply-To: <20080202135222.GA23700@uranus.ravnborg.org>
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
prev parent reply other threads:[~2008-02-02 22:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 13:52 Sam Ravnborg
2008-02-02 22:39 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080202223917.GC27546@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®