Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2014 02:35:44 +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: r269208 - head/sys/arm/arm
Message-ID:  <201407290235.s6T2ZiO9074010@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Jul 29 02:35:44 2014
New Revision: 269208
URL: http://svnweb.freebsd.org/changeset/base/269208

Log:
  Correct the comparison logic when looking for intersections between
  exclusion zones and phsyical memory.  The phys_avail[i] entries are the
  address of the first byte of ram in the region, and phys_avail[i+1]
  entries are the address of the first byte of ram in the next region
  (i.e., they're not included in the region that starts at phys_avail[i]).
  
  Reviewed by:	cognet

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v6.c	Tue Jul 29 02:34:32 2014	(r269207)
+++ head/sys/arm/arm/busdma_machdep-v6.c	Tue Jul 29 02:35:44 2014	(r269208)
@@ -252,9 +252,9 @@ exclusion_bounce_check(vm_offset_t lowad
 		return (0);
 
 	for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) {
-		if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1])
+		if ((lowaddr >= phys_avail[i] && lowaddr < phys_avail[i + 1])
 		    || (lowaddr < phys_avail[i] &&
-		    highaddr > phys_avail[i]))
+		    highaddr >= phys_avail[i]))
 			return (1);
 	}
 	return (0);



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