Re: Question: attribute 'naked'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux