Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2014 20:19:42 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261676 - head/sys/arm/arm
Message-ID:  <201402092019.s19KJg5Z002778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402092019.s19KJg5Z002778>