* [Question] For what stand's __initdata, __devinit etc. ? @ 2010-01-12 16:58 René Bolldorf 2010-01-12 23:42 ` Henrique de Moraes Holschuh 0 siblings, 1 reply; 5+ messages in thread From: René Bolldorf @ 2010-01-12 16:58 UTC (permalink / raw) To: linux-kernel Hi, Do we really need this? It will be nice if someone can me explain this. Thx in advance. René ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Question] For what stand's __initdata, __devinit etc. ? 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 0 siblings, 1 reply; 5+ messages in thread From: Henrique de Moraes Holschuh @ 2010-01-12 23:42 UTC (permalink / raw) To: René Bolldorf; +Cc: linux-kernel 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 -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Question] For what stand's __initdata, __devinit etc. ? 2010-01-12 23:42 ` Henrique de Moraes Holschuh @ 2010-01-13 11:39 ` Tilman Schmidt 2010-01-13 16:37 ` Stefan Richter 0 siblings, 1 reply; 5+ messages in thread From: Tilman Schmidt @ 2010-01-13 11:39 UTC (permalink / raw) To: Henrique de Moraes Holschuh; +Cc: René Bolldorf, linux-kernel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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. - -- Tilman Schmidt E-Mail: tilman@imap.cc Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktNsOMACgkQQ3+did9BuFtfrwCfUO+z1SWLRs97+lrfp6FjC61a dzwAnR02pQ+qAdSN58YEh1kL8BwoRwqz =z9Hb -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Question] For what stand's __initdata, __devinit etc. ? 2010-01-13 11:39 ` Tilman Schmidt @ 2010-01-13 16:37 ` Stefan Richter 2010-01-13 17:12 ` René Bolldorf 0 siblings, 1 reply; 5+ messages in thread From: Stefan Richter @ 2010-01-13 16:37 UTC (permalink / raw) To: Tilman Schmidt Cc: Henrique de Moraes Holschuh, René Bolldorf, linux-kernel 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. -- Stefan Richter -=====-==-=- ---= -==-= http://arcgraph.de/sr/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Question] For what stand's __initdata, __devinit etc. ? 2010-01-13 16:37 ` Stefan Richter @ 2010-01-13 17:12 ` René Bolldorf 0 siblings, 0 replies; 5+ messages in thread From: René Bolldorf @ 2010-01-13 17:12 UTC (permalink / raw) To: Stefan Richter; +Cc: Tilman Schmidt, Henrique de Moraes Holschuh, linux-kernel 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 :-) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-13 17:12 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox