From owner-svn-src-all@freebsd.org Wed Jan 13 00:41:27 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 2EE30A8054B for ; Wed, 13 Jan 2016 00:41:27 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 C3B1E1C00 for ; Wed, 13 Jan 2016 00:41:26 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22b.google.com with SMTP id u188so277609504wmu.1 for ; Tue, 12 Jan 2016 16:41:26 -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=tQc8m8nB5dObgc3WqtJklQ10W/znGGLIRcKmaIarmVA=; b=t825L7X7HvKLF5YIZhn1gt/cjdi1Z1bG/UdliRsIib+rxgKr8ldmij8eafcrDKEtgh LIW8mumbePZ076szpJ3G3msLVT4vWi64YDkvR8JjbvSgweGF/AKbygYMSZVkGYImjvjL Uj7j9wWRP8Trs5QmWqw1ex1AtKcxKKzhc1DC65IMxL8xxweaIrkb0C80Fm2PiG78NQDW PGenDt4p4RF1NlZe5hlFS4eqpNDsyNvWAXcd8H+U1y5xm/CpKaxLlXdqOzz6nKDQoDgu cNdDbw4LwWBm1F1SDYVCuOcbWF8wky4Pa13Rw20bhvGmCXQzdcFSpnuWzitKJHOXzrOs EmgA== 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=tQc8m8nB5dObgc3WqtJklQ10W/znGGLIRcKmaIarmVA=; b=AQa8w9eJ3JDPuJeKVS6+WJC1OTgKDKCEqQWD/cXZoS3wkPbgjBNfKbmJI4YMHE1cIS R6xv11NtABxsIBzw4rgC/fRRriTcwcS+e0JWKYMvcCvmK2cPpCowGNfFw6gv11sfBKm4 O8Net0SLz/AhigEGFSe98fby5cWdYL7Zem5DOAlxDLbr/v/EGyG4N+BroUx6RHid5i12 TTf45KiRDHQNqUxaHZdX8ACHlEsb/OkRv4G6rRK18jDBQCm3tl3CwHtixvJoyuu/6Mdk OXtSxXIagK2cnbeNJO85Vg/HbvlQ4j3zx/0g98Y4l5fE6Z6rlg3DX76FQ1Lx7zYreS3Y s2OA== X-Gm-Message-State: ALoCoQnnVHSEa5tQNTZY7R5Fk7Sx57JGAkWhYKfo6NQY38HXusQB19/KnBm18OJovImlAAP1kgAXWbjRK+Y99QBR7muvC2m8iQ== X-Received: by 10.194.90.50 with SMTP id bt18mr142501090wjb.118.1452645685029; Tue, 12 Jan 2016 16:41:25 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id da10sm126451046wjb.22.2016.01.12.16.41.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jan 2016 16:41:23 -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> <569582F6.4060108@multiplay.co.uk> <1452644710.46848.31.camel@freebsd.org> From: Steven Hartland Message-ID: <56959D45.7070204@multiplay.co.uk> Date: Wed, 13 Jan 2016 00:41:41 +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: <1452644710.46848.31.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; 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: Wed, 13 Jan 2016 00:41:27 -0000 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? 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) >>> >>