Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2014 06:06:42 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262924 - head/sys/arm/at91
Message-ID:  <201403080606.s2866gBH070776@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sat Mar  8 06:06:42 2014
New Revision: 262924
URL: http://svnweb.freebsd.org/changeset/base/262924

Log:
  Properly round on unmapping.

Modified:
  head/sys/arm/at91/at91.c

Modified: head/sys/arm/at91/at91.c
==============================================================================
--- head/sys/arm/at91/at91.c	Sat Mar  8 05:03:56 2014	(r262923)
+++ head/sys/arm/at91/at91.c	Sat Mar  8 06:06:42 2014	(r262924)
@@ -84,8 +84,12 @@ at91_bs_unmap(void *t, bus_space_handle_
 {
 	vm_offset_t va, endva;
 
+	if (t == 0)
+		return;
 	va = trunc_page((vm_offset_t)t);
-	endva = va + round_page(size);
+	if (va >= AT91_BASE && va <= AT91_BASE + 0xff00000)
+		return;
+	endva = round_page((vm_offset_t)t + size);
 
 	/* Free the kernel virtual mapping. */
 	kva_free(va, endva - va);



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