diff options
author | imp <imp@FreeBSD.org> | 2014-03-08 06:06:42 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-03-08 06:06:42 +0000 |
commit | 0f914ddcb5bdb893d9b84ed701808abea3f47a7b (patch) | |
tree | 0f4bb27679be2d019ac57d3eb15240a542dc13c5 | |
parent | 1395253f325859b2cfa3f0b17e22d81600aaec7c (diff) | |
download | FreeBSD-src-0f914ddcb5bdb893d9b84ed701808abea3f47a7b.zip FreeBSD-src-0f914ddcb5bdb893d9b84ed701808abea3f47a7b.tar.gz |
Properly round on unmapping.
-rw-r--r-- | sys/arm/at91/at91.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c index dce1f93..384e1c1 100644 --- a/sys/arm/at91/at91.c +++ b/sys/arm/at91/at91.c @@ -84,8 +84,12 @@ at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) { 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); |