Index: sys/vm/vm_phys.c =================================================================== --- sys/vm/vm_phys.c +++ sys/vm/vm_phys.c @@ -697,8 +697,9 @@ { int order; - KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & - ((PAGE_SIZE << fls(npages / 2)) - 1)) == 0, + KASSERT(npages == 0 || + ((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & + ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, ("vm_phys_enq_range: page %p and npages %u are misaligned", m, npages)); while (npages > 0) {