From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
linux-sparse@vger.kernel.org,
linux-arm-kernel@lists.arm.linux.org.uk,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: Question: attribute 'naked'
Date: Wed, 5 Aug 2009 09:50:47 +0200 [thread overview]
Message-ID: <20090805075047.GC18938@pengutronix.de> (raw)
In-Reply-To: <20090805061936.GB2861@merkur.ravnborg.org>
Hello,
On Wed, Aug 05, 2009 at 08:19:36AM +0200, Sam Ravnborg wrote:
> cc: linux-sparse
> On Tue, Aug 04, 2009 at 11:15:11PM +0100, Russell King - ARM Linux wrote:
> > On Tue, Aug 04, 2009 at 06:03:22PM -0400, H Hartley Sweeten wrote:
> > > When compiling the kernel with sparse, in arch/arm/mm/copypage-v4wb.c
> > > I get the following error:
> > >
> > > arch/arm/mm/copypage-v4wb.c:25:13: error: attribute 'naked': unknown attribute
> >
> > Sparse doesn't understand the naked attribute. GCC does.
> >
> > > /*
> > > * it doesn't make sense on ARM (currently the only user of __naked) to trace
> > > * naked functions because then mcount is called without stack and frame pointer
> > > * being set up and there is no chance to restore the lr register to the value
> > > * before mcount was called.
> > > */
> > > #define __naked __attribute__((naked)) notrace
> > >
> > > Is this macro actually correct? The compiler I am using is:
Quoting gcc documentation:
Use [naked] on the ARM, AVR, IP2K and SPU ports to indicate
that the specified function does not need prologue/epilogue
sequences generated by the compiler. It is up to the programmer
to provide these sequences.
This is typically used for functions that only consist of a single asm
statement.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-08-05 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BD79186B4FD85F4B8E60E381CAEE190901B7781D@mi8nycmail19.Mi8.com>
[not found] ` <20090804221511.GA17112@n2100.arm.linux.org.uk>
2009-08-05 6:19 ` Question: attribute 'naked' Sam Ravnborg
2009-08-05 7:50 ` Uwe Kleine-König [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=20090805075047.GC18938@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).