* Re: Question: attribute 'naked'
[not found] ` <20090804221511.GA17112@n2100.arm.linux.org.uk>
@ 2009-08-05 6:19 ` Sam Ravnborg
2009-08-05 7:50 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Sam Ravnborg @ 2009-08-05 6:19 UTC (permalink / raw)
To: Russell King - ARM Linux, linux-sparse
Cc: H Hartley Sweeten, linux-arm-kernel
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:
>
> Yes - naked instructions can't be traced, because they tend to have
> entry/exit sequences which mcount won't understand.
>
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
> FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question: attribute 'naked'
2009-08-05 6:19 ` Question: attribute 'naked' Sam Ravnborg
@ 2009-08-05 7:50 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2009-08-05 7:50 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: Russell King - ARM Linux, linux-sparse, linux-arm-kernel,
Sam Ravnborg
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-05 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 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).