From: Domen Puncer <domen.puncer@telargo.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] introduce __init_exit function annotation
Date: Tue, 17 Jul 2007 10:55:32 +0200 [thread overview]
Message-ID: <20070717085532.GL4375@moe.telargo.com> (raw)
In-Reply-To: <20070717083156.GB3801@stusta.de>
On 17/07/07 10:31 +0200, Adrian Bunk wrote:
> On Tue, Jul 17, 2007 at 10:02:48AM +0200, Domen Puncer wrote:
> > Introduce __init_exit, which is useful ie. for drivers that call
> > cleanup functions when they fail in __init functions.
> >
> >
> > Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
> > ---
> > include/linux/init.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > Index: work-powerpc.git/include/linux/init.h
> > ===================================================================
> > --- work-powerpc.git.orig/include/linux/init.h
> > +++ work-powerpc.git/include/linux/init.h
> > @@ -60,8 +60,10 @@
> >
> > #ifdef MODULE
> > #define __exit __attribute__ ((__section__(".exit.text")))
> > +#define __init_exit
> > #else
> > #define __exit __attribute_used__ __attribute__ ((__section__(".exit.text")))
> > +#define __init_exit __init
> > #endif
> >
> > /* For assembly routines */
>
> This doesn't work on architectures like i386 where __exit code is
> discarded at runtime.
If it's a module, then it shouldn't be discarded until unload anyway.
If it's in-kernel, then it'll be discarded as __init stuff.
I don't see a problem?
BTW. can you point me to reasoning for discarding __exit at runtime?
Domen
>
> cu
> Adrian
>
> --
>
> "Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
> "Only a promise," Lao Er said.
> Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2007-07-17 8:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 8:02 [PATCH] introduce __init_exit function annotation Domen Puncer
2007-07-17 8:31 ` Adrian Bunk
2007-07-17 8:55 ` Domen Puncer [this message]
2007-07-17 13:02 ` Sam Ravnborg
2007-07-17 14:52 ` Takashi Iwai
2007-07-17 15:14 ` Sam Ravnborg
2007-07-17 15:16 ` Takashi Iwai
2007-07-17 15:32 ` Sam Ravnborg
2007-07-17 15:40 ` Takashi Iwai
2007-07-17 16:48 ` Sam Ravnborg
2007-07-17 17:02 ` Takashi Iwai
2007-07-17 19:44 ` Domen Puncer
2007-07-17 17:48 ` Domen Puncer
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=20070717085532.GL4375@moe.telargo.com \
--to=domen.puncer@telargo.com \
--cc=bunk@stusta.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.