From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:19:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D771CCE; Sun, 9 Feb 2014 20:19:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 570A6134D; Sun, 9 Feb 2014 20:19:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KJgh2002779; Sun, 9 Feb 2014 20:19:42 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KJg5Z002778; Sun, 9 Feb 2014 20:19:42 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092019.s19KJg5Z002778@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 20:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261676 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Sun, 09 Feb 2014 20:19:42 -0000 Author: ian Date: Sun Feb 9 20:19:41 2014 New Revision: 261676 URL: http://svnweb.freebsd.org/changeset/base/261676 Log: Fix the exclude-region clipping logic for the edge-trim case. Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sun Feb 9 20:17:40 2014 (r261675) +++ head/sys/arm/arm/physmem.c Sun Feb 9 20:19:41 2014 (r261676) @@ -198,14 +198,14 @@ regions_to_avail(vm_paddr_t *avail, uint continue; } /* - * If excluded region partially overlaps this region, - * trim the excluded portion off the appropriate end. + * We know the excluded region overlaps either the start + * or end of this hardware region (but not both), trim + * the excluded portion off the appropriate end. */ - if ((xstart >= start) && (xstart <= end)) { - end = xstart; - } else if ((xend >= start) && (xend <= end)) { + if (xstart <= start) start = xend; - } + else + end = xstart; } /* * If the trimming actions above left a non-zero size, create an