From owner-svn-src-all@freebsd.org Wed Jan 13 00:56:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7565A80A36 for ; Wed, 13 Jan 2016 00:56:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE1415A9 for ; Wed, 13 Jan 2016 00:56:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 13 Jan 2016 00:57:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u0D0unJr006033; Tue, 12 Jan 2016 17:56:49 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1452646609.46848.39.camel@freebsd.org> Subject: Re: svn commit: r293775 - head/sys/boot/uboot/lib From: Ian Lepore To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 12 Jan 2016 17:56:49 -0700 In-Reply-To: <56959D45.7070204@multiplay.co.uk> References: <201601121631.u0CGV7v6074494@repo.freebsd.org> <569582F6.4060108@multiplay.co.uk> <1452644710.46848.31.camel@freebsd.org> <56959D45.7070204@multiplay.co.uk> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2016 00:56:51 -0000 On Wed, 2016-01-13 at 00:41 +0000, Steven Hartland wrote: > Was this meant to be a full revert as you now have: > > subldr = rounddown2((uintptr_t)_start, KERN_ALIGN); > > vs the original: > > subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN); > > i.e. missing the final conversion to uint64_t? > > The uint64_t cast is still redudant so I didn't add that back. -- Ian > > On 13/01/2016 00:25, Ian Lepore wrote: > > On Tue, 2016-01-12 at 22:49 +0000, Steven Hartland wrote: > > > I think this breaks arm arches: > > > /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24 > > > : > > > error: use of undeclared identifier 'uintfptr_t' > > > subldr = rounddown2((uintfptr_t)_start, > > > KERN_ALIGN); > > > ^ > > > /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/ > > > para > > > m.h:295:28: > > > note: expanded from macro 'rounddown2' > > > #define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is > > > power > > > of > > > two */ > > > > > Ooops, sorry. Should be fixed now. > > > > -- Ian > > > > > On 12/01/2016 16:31, Ian Lepore wrote: > > > > Author: ian > > > > Date: Tue Jan 12 16:31:07 2016 > > > > New Revision: 293775 > > > > URL: https://svnweb.freebsd.org/changeset/base/293775 > > > > > > > > Log: > > > > Cast using uintfptr_t and eliminate the cast to uint64_t > > > > which > > > > is uneeded > > > > because rounding down cannot increase the number of bits > > > > needed > > > > to express > > > > the result. > > > > > > > > I had no idea there was such a thing as uintfptr_t. > > > > > > > > Requested by: bde > > > > > > > > Modified: > > > > head/sys/boot/uboot/lib/copy.c > > > > > > > > Modified: head/sys/boot/uboot/lib/copy.c > > > > =============================================================== > > > > ==== > > > > =========== > > > > --- head/sys/boot/uboot/lib/copy.c Tue Jan 12 16:21:34 > > > > 2016 > > > > (r293774) > > > > +++ head/sys/boot/uboot/lib/copy.c Tue Jan 12 16:31:07 > > > > 2016 > > > > (r293775) > > > > @@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u > > > > > > > > biggest_block = 0; > > > > biggest_size = 0; > > > > - subldr = > > > > rounddown2((uint64_t)(uintptr_t)_start, > > > > KERN_ALIGN); > > > > + subldr = rounddown2((uintfptr_t)_start, > > > > KERN_ALIGN); > > > > eubldr = roundup2((uint64_t)uboot_heap_end, > > > > KERN_ALIGN); > > > > for (i = 0; i < si->mr_no; i++) { > > > > if (si->mr[i].flags != MR_ATTR_DRAM) > > > > > > > > >