public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "René Bolldorf" <xsecute@googlemail.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Tilman Schmidt <tilman@imap.cc>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	linux-kernel@vger.kernel.org
Subject: Re: [Question]  For what stand's __initdata, __devinit etc. ?
Date: Wed, 13 Jan 2010 18:12:36 +0100	[thread overview]
Message-ID: <4B4DFF04.2070109@googlemail.com> (raw)
In-Reply-To: <4B4DF6B1.406@s5r6.in-berlin.de>

On 01/13/10 17:37, Stefan Richter wrote:
> Tilman Schmidt wrote:
>> Am 2010-01-13 00:42 schrieb Henrique de Moraes Holschuh:
>>> On Tue, 12 Jan 2010, René Bolldorf wrote:
>>>> Hi,
>>>> Do we really need this?
>>>> It will be nice if someone can me explain this.
>>>
>>> http://kernelnewbies.org/FAQ/InitExitMacros
>>
>> That's far from complete. It does not, for example, mention __devinit.
>
> This wiki contains also somewhat misleadingly worded text:  "But why
> must you use these macros ?"  This should read:  "But why would you want
> to use these macros?"
>
> Answer:  They are a micro-optimization which allows the kernel to free
> memory that was occupied by this code at some point, because that code
> won't be used after that point anymore.  (In case of exit macros:  These
> are hints to discard some code from a build in case of certain kernel
> configurations.)  These macros only affect code which is statically
> linked into the kernel.
>
> Some macros, like for example __devinit, have so obscure uses and
> marginal benefits that a normal developer should not bother about them.
> __devinit in particular does not have any effect at all --- except if
> CONFIG_HOTPLUG is not defined.  This may happen in configurations for
> embedded systems.  But the majority of device drivers that you can find
> in the kernel tree are irrelevant (i.e. configured off) on such systems
> anyway.
>
> Some more information on these macros can be found in Corbet, Rubini,
> Kroah-Hartman: Linux Device Drivers, 3rd edition a.k.a. LDD3, which is
> also gratis available on the Web.

Thanks @all :-)

      reply	other threads:[~2010-01-13 17:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 16:58 [Question] For what stand's __initdata, __devinit etc. ? René Bolldorf
2010-01-12 23:42 ` Henrique de Moraes Holschuh
2010-01-13 11:39   ` Tilman Schmidt
2010-01-13 16:37     ` Stefan Richter
2010-01-13 17:12       ` René Bolldorf [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=4B4DFF04.2070109@googlemail.com \
    --to=xsecute@googlemail.com \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=tilman@imap.cc \
    /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