From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 21 Feb 2012 23:33:55 +0530 Subject: [U-Boot] [PATCH 2/4] arm: add %function attribute to assembly functions In-Reply-To: <201202211042.08315.vapier@gentoo.org> References: <1328528248-20872-1-git-send-email-aneesh@ti.com> <201202202319.16547.vapier@gentoo.org> <20120221143331.GB23487@bill-the-cat> <201202211042.08315.vapier@gentoo.org> Message-ID: <4F43DC8B.1000409@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 21 February 2012 09:12 PM, Mike Frysinger wrote: > On Tuesday 21 February 2012 09:33:31 Tom Rini wrote: >> On Mon, Feb 20, 2012 at 11:19:14PM -0500, Mike Frysinger wrote: >>> On Monday 20 February 2012 16:53:40 Simon Glass wrote: >>>> On Mon, Feb 20, 2012 at 12:07 PM, Tom Rini wrote: >>>>> On Sun, Feb 19, 2012 at 02:15:30AM -0500, Mike Frysinger wrote: >>>>>> On Saturday 18 February 2012 17:03:59 Simon Glass wrote: >>>>>>> On Wed, Feb 15, 2012 at 5:57 AM, Aneesh V wrote: >>>>>>>> -.globl reset_cpu >>>>>>>> +.type reset_cpu, %function >>>>>>>> +.global reset_cpu >>>>>>> >>>>>>> Should we introduce a macro to deal with this rather than writing >>>>>>> it out each time? EXPORT()? >>>>>> >>>>>> we have it already with the linux/linkage.h header :) >>>>> >>>>> Well, unless my tree is out of date (or stuff is in-flight) we don't >>>>> have the full compliment here. We have for all and >>>>> for bfin. That said, yes, we should grab at least >>>>> the ARM version and make use of ENTRY/END_FUNC ala the kernel. I'm >>>>> behind on my "convert __attribute__((...)) to __attr" series already >>>>> or I'd say more :) >>>> >>>> In case one of you is going to look at this, can we try to use >>>> asm-generic as much as possible? >>> >>> i don't know what you mean ... we already have linux/linkage.h with >>> sane defaults for pretty much everyone. the Blackfin asm/linkage.h is >>> an empty file to satisfy building. >> >> Well, the kernel version for blackfin sets ALIGN/ALIGN_STR, so are they >> out of sync? > > the overall linkage.h concept is the same, but we've unified things better in > the u-boot code. Linux's common linkage.h has x86-centric defaults which we > specifically avoided in the u-boot version. > > we might want to tweak the ENDPROC() in u-boot's linkage.h to use % rather > than @ since the latter is a comment char in arm asm and the former should > work for all the arches i know of just the same as @. i expect the arm guys > to submit a patch though at the same time they add a stub asm/linkage.h ;). I was planning to do that in the next revision of this series. BTW, I guess the following in the arm linkage.h of kernel is useful too. Any thoughts? #define __ALIGN .align 0 #define __ALIGN_STR ".align 0" BTW, I am not volunteering to convert all the assembly functions in ARM to the new format:) I shall do it for armv7. br, Aneesh