svn commit: r261676 - head/sys/arm/arm

Ian Lepore ian at FreeBSD.org
Sun Feb 9 20:19:42 UTC 2014


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


More information about the svn-src-all mailing list