diff options
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/acpica/acpi_machdep.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c index f57bdc2..e5dd4c3 100644 --- a/sys/amd64/acpica/acpi_machdep.c +++ b/sys/amd64/acpica/acpi_machdep.c @@ -122,7 +122,7 @@ table_map(vm_paddr_t pa, int offset, vm_offset_t length) void *data; off = pa & PAGE_MASK; - length = roundup(length + off, PAGE_SIZE); + length = round_page(length + off); pa = pa & PG_FRAME; va = (vm_offset_t)pmap_kenter_temporary(pa, offset) + (offset * PAGE_SIZE); @@ -146,7 +146,7 @@ table_unmap(void *data, vm_offset_t length) va = (vm_offset_t)data; off = va & PAGE_MASK; - length = roundup(length + off, PAGE_SIZE); + length = round_page(length + off); va &= ~PAGE_MASK; while (length > 0) { pmap_kremove(va); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f30a071..c6c62ae 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -5015,7 +5015,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode) return ((void *)va); } offset = pa & PAGE_MASK; - size = roundup(offset + size, PAGE_SIZE); + size = round_page(offset + size); va = kmem_alloc_nofault(kernel_map, size); if (!va) panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); @@ -5051,7 +5051,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) return; base = trunc_page(va); offset = va & PAGE_MASK; - size = roundup(offset + size, PAGE_SIZE); + size = round_page(offset + size); kmem_free(kernel_map, base, size); } @@ -5173,7 +5173,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode) PMAP_LOCK_ASSERT(kernel_pmap, MA_OWNED); base = trunc_page(va); offset = va & PAGE_MASK; - size = roundup(offset + size, PAGE_SIZE); + size = round_page(offset + size); /* * Only supported on kernel virtual addresses, including the direct |