mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Properly round on unmapping.
This commit is contained in:
parent
1dd7152066
commit
ebb61891fb
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue