From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: Question: attribute 'naked' Date: Wed, 5 Aug 2009 09:50:47 +0200 Message-ID: <20090805075047.GC18938@pengutronix.de> References: <20090804221511.GA17112@n2100.arm.linux.org.uk> <20090805061936.GB2861@merkur.ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:35147 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932890AbZHEHuv (ORCPT ); Wed, 5 Aug 2009 03:50:51 -0400 Content-Disposition: inline In-Reply-To: <20090805061936.GB2861@merkur.ravnborg.org> Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: H Hartley Sweeten Cc: Russell King - ARM Linux , linux-sparse@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk, 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 wr= ote: > > 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-v4= wb.c > > > I get the following error: > > >=20 > > > arch/arm/mm/copypage-v4wb.c:25:13: error: attribute 'naked': unkn= own attribute=20 > >=20 > > Sparse doesn't understand the naked attribute. GCC does. > >=20 > > > /* > > > * it doesn't make sense on ARM (currently the only user of __nak= ed) to trace > > > * naked functions because then mcount is called without stack an= d 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 > > >=20 > > > 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 --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig = | 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