From owner-svn-src-all@freebsd.org Tue Jan 12 22:49:13 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 DB74AA6D6C8 for ; Tue, 12 Jan 2016 22:49:12 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7674C1EED for ; Tue, 12 Jan 2016 22:49:12 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22f.google.com with SMTP id b14so344417044wmb.1 for ; Tue, 12 Jan 2016 14:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=woks5d2wuFtctd5ODaEB9Mq9qSCD1AmrEirPXRFw3G0=; b=hcQwrvGYOzNL4dIz4IEPrwq+4ToMWPXHQDnmUufyA2w9Ei/EyupbpmKMrICRIr3Ufx F5nJ3mOfL6jbRenmqVIeYb3eV57FhkugUJFrvhJMHOcjvTrcFmNJ+LwGA+ZGaOr9F/O9 JR4KQwbhpo4SXGKJtrJ3U1QdYxu8lU9xXLtSTqdd/k1U9x3uAyCDk0mohNGxULiihL3h 2siQJiJwRRO9vd9wL14gr2/m+s8l+ofwjscXBg+VCH7AldhsyNfJ534NHsf23yOSONzY t1GuBEvESCcaEHvAm1DbOVQ+jhob1ThYp55GEQgHmVeQDWfniKDwSLCfNRNHUcz8Y27Y LPNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=woks5d2wuFtctd5ODaEB9Mq9qSCD1AmrEirPXRFw3G0=; b=mxdqeTGqI5eIkZFrtL1mBiV6cas3bXhjpnh3TsQXbXm7ye6Nobby+4BokAVy6kiuxg 3c38rmLt0bB7xchvTgQlAARNxubmbLf5sytsRa3JyqFpqzZOZee8dv31MsxJ71ozKblH 1daQhSnabOm7gXzib/ijVVUlsdzAd0q6uaAH8sFJvFIXFmM9i4sWNNxhTMb3uct5QTtg rps3QOx1smubOH82O0kjH4T8k/VsWcBHKxEQUscnfsbHJCEkabZF5cQuZnx5SYRtjNUw OUxGOfCoZk3cCiiDNVKpgQP6+SQ3ZPieYPC/cF96oP3HCkQYPAP89p0UgBSR5UtKgiKh 4zLQ== X-Gm-Message-State: ALoCoQnhv12kbmUVaSBsLTjwz98x9IufJ0wvaYhilPy8xt0w7azGvuJns4H+NSxFlx5Z4rTPBHdziziZdDhGZtm2zD3+b89ikw== X-Received: by 10.28.224.212 with SMTP id x203mr22814590wmg.29.1452638950970; Tue, 12 Jan 2016 14:49:10 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id av8sm51568149wjc.13.2016.01.12.14.49.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jan 2016 14:49:09 -0800 (PST) Subject: Re: svn commit: r293775 - head/sys/boot/uboot/lib To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601121631.u0CGV7v6074494@repo.freebsd.org> From: Steven Hartland Message-ID: <569582F6.4060108@multiplay.co.uk> Date: Tue, 12 Jan 2016 22:49:26 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201601121631.u0CGV7v6074494@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed 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: Tue, 12 Jan 2016 22:49:13 -0000 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/param.h:295:28: note: expanded from macro 'rounddown2' #define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ 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) >