LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Coexistence of EXPORT_SYMBOL() and __cpuinit
@ 2008-02-04  1:49 Peter Teoh
  2008-02-04  5:13 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Teoh @ 2008-02-04  1:49 UTC (permalink / raw)
  To: LKML

In kernel/cpu.c, there exists API that is declared as __cpuinit, and
at the same time exported via EXPORT_SYMBOL().

Can these two attribute coexists at the same time?   I mean, when it
is declared with EXPORT_SYMBOL, according to include/linux/module.h,
it is placed in a __ksymtab section, and when compiled with with
__cpuinit, according to include/linux/init.h, into a __cpuinit
section.

Can gcc compiled ELF support this feature?

Anyway, logical speaking, if it is EXPORT_SYMBOL, it is meant to be
long-lasting, and not short-live as __cpuinit is meant to be, right?

Please comment, thanks.

If ok, I will modify the cpu.c to remove all the __cpuinit whenever
EXPORT_SYMBOL is encountered for it (or any __init in general :-)).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coexistence of EXPORT_SYMBOL() and __cpuinit
  2008-02-04  1:49 Coexistence of EXPORT_SYMBOL() and __cpuinit Peter Teoh
@ 2008-02-04  5:13 ` Sam Ravnborg
  2008-02-05 23:48   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2008-02-04  5:13 UTC (permalink / raw)
  To: Peter Teoh; +Cc: LKML

On Mon, Feb 04, 2008 at 09:49:24AM +0800, Peter Teoh wrote:
> In kernel/cpu.c, there exists API that is declared as __cpuinit, and
> at the same time exported via EXPORT_SYMBOL().
> 
> Can these two attribute coexists at the same time?   I mean, when it
> is declared with EXPORT_SYMBOL, according to include/linux/module.h,
> it is placed in a __ksymtab section, and when compiled with with
> __cpuinit, according to include/linux/init.h, into a __cpuinit
> section.

kbuild.git contains a commit so we no longer warn about
symbols being exported if annotatated with __cpuinit, __devinit, and
__devinit.

I've requested Linus to pull the changes and expet it to happen
within the next two days.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coexistence of EXPORT_SYMBOL() and __cpuinit
  2008-02-04  5:13 ` Sam Ravnborg
@ 2008-02-05 23:48   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2008-02-05 23:48 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Peter Teoh, LKML

On Mon, 4 Feb 2008 06:13:18 +0100 Sam Ravnborg wrote:

> On Mon, Feb 04, 2008 at 09:49:24AM +0800, Peter Teoh wrote:
> > In kernel/cpu.c, there exists API that is declared as __cpuinit, and
> > at the same time exported via EXPORT_SYMBOL().
> > 
> > Can these two attribute coexists at the same time?   I mean, when it
> > is declared with EXPORT_SYMBOL, according to include/linux/module.h,
> > it is placed in a __ksymtab section, and when compiled with with
> > __cpuinit, according to include/linux/init.h, into a __cpuinit
> > section.
> 
> kbuild.git contains a commit so we no longer warn about
> symbols being exported if annotatated with __cpuinit, __devinit, and
> __devinit.

but why?  Is this just to reduce the volume of output, even though
exported __init symbols are a problem waiting to happen?


> I've requested Linus to pull the changes and expet it to happen
> within the next two days.


---
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-05 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-04  1:49 Coexistence of EXPORT_SYMBOL() and __cpuinit Peter Teoh
2008-02-04  5:13 ` Sam Ravnborg
2008-02-05 23:48   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).