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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to