Home
last modified time | relevance | path

Searched refs:rounddown2 (Results 1 – 25 of 71) sorted by relevance

123

/freebsd/tools/build/cross-build/include/common/sys/
H A Dparam.h77 #ifndef rounddown2
78 #define rounddown2(x, y) ((x) & (~((y)-1))) /* if y is power of two */ macro
/freebsd/sys/crypto/
H A Dchacha20_poly1305.c58 todo = rounddown2(resid, CHACHA20_NATIVE_BLOCK_LEN); in chacha20_poly1305_encrypt()
124 todo = rounddown2(resid, CHACHA20_NATIVE_BLOCK_LEN); in chacha20_poly1305_decrypt()
161 todo = rounddown2(resid, CHACHA20_NATIVE_BLOCK_LEN); in xchacha20_poly1305_encrypt()
227 todo = rounddown2(resid, CHACHA20_NATIVE_BLOCK_LEN); in xchacha20_poly1305_decrypt()
/freebsd/stand/uboot/
H A Dcopy.c101 subldr = rounddown2((uintptr_t)_start, KERN_ALIGN); in uboot_loadaddr()
108 eblock = rounddown2((uint64_t)si->mr[i].start + in uboot_loadaddr()
/freebsd/sys/sys/
H A Dparam.h207 #define trunc_page(x) rounddown2(x, PAGE_SIZE)
326 #define rounddown2(x, y) __align_down(x, y) /* if y is power of two */ macro
/freebsd/sys/opencrypto/
H A Dcryptosoft.c182 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
440 inlen = rounddown2(crp->crp_aad_length, blksz); in swcr_gcm()
456 inlen = rounddown2(MIN(inlen, resid), blksz); in swcr_gcm()
500 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
515 todo = rounddown2(MIN(resid, inlen), blksz); in swcr_gcm()
579 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
830 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
916 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
1039 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1120 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
/freebsd/stand/kboot/kboot/
H A Dmain.c477 sz = MIN(sz, rounddown2(mem_avail * 45 / 100, SEGALIGN)); in get_phys_buffer()
481 rounddown2((commit_limit - committed_as) * 95 / 100, SEGALIGN)); in get_phys_buffer()
487 loaded_segments[nkexec_segments].mem = (void *)rounddown2(dest,SEGALIGN); in get_phys_buffer()
/freebsd/stand/arm64/libarm64/
H A Dcache.c95 addr = rounddown2(addr, cl_size); in cpu_flush_dcache()
/freebsd/sys/compat/linux/
H A Dlinux_elf.c349 destp = rounddown2(destp, sizeof(void *)); in __linuxN()
371 destp = rounddown2(destp, sizeof(void *)); in __linuxN()
380 destp = rounddown2(destp, sizeof(void *)); in __linuxN()
/freebsd/sys/riscv/sifive/
H A Dsifive_ccache.c97 for (line = rounddown2(paddr, SIFIVE_CCACHE_LINE_SIZE); in ccache_flush_range()
/freebsd/sys/dev/agp/
H A Dagp_nvidia.c212 sc->pg_offset = rounddown2(apbase & (64 * 1024 * 1024 - 1), in agp_nvidia_attach()
406 mask = (0xfULL << 32) | rounddown2(0xfffff000, size) | 0x800; in nvidia_init_iorr()
/freebsd/tools/test/stress2/misc/
H A Dcollapse.sh109 off = rounddown2(arc4random() % ADRSPACE, PAGE_SIZE);
/freebsd/sys/vm/
H A Dvm_reserv.c419 index = rounddown2(index, 128) / 64; in vm_reserv_is_sublevel_full()
460 rv->pages[rounddown2(index, VM_SUBLEVEL_0_NPAGES)].psind = 0; in vm_reserv_depopulate()
583 rv->pages[rounddown2(index, VM_SUBLEVEL_0_NPAGES)].psind = 1; in vm_reserv_populate()
1138 index = rounddown2(m - rv->pages, npages); in vm_reserv_is_populated()
1516 return (rv->pages + rounddown2(m - rv->pages, in vm_reserv_to_superpage()
H A Dvm_fault.c399 while (rounddown2(vaddr, pagesizes[psind]) < fs->entry->start || in vm_fault_soft_fast()
408 m_super += rounddown2(m - m_super, in vm_fault_soft_fast()
416 vaddr = rounddown2(vaddr, pagesizes[psind]); in vm_fault_soft_fast()
1853 end = rounddown2(vaddr, size); in vm_fault_dontneed()
/freebsd/sys/kern/
H A Dkern_exec.c1255 stack_top -= rounddown2(stack_off & PAGE_MASK, sizeof(void *)); in exec_map_stack()
1687 destp = rounddown2(destp, sizeof(void *)); in exec_copyout_strings()
1699 destp = rounddown2(destp, sizeof(void *)); in exec_copyout_strings()
1722 destp = rounddown2(destp, sizeof(void *)); in exec_copyout_strings()
1732 destp = rounddown2(destp, sizeof(void *)); in exec_copyout_strings()
1741 destp = rounddown2(destp, sizeof(void *)); in exec_copyout_strings()
/freebsd/sys/dev/hyperv/hvsock/
H A Dhv_sock.c1385 "%s: available size is %u\n", __func__, rounddown2(ret, 8)); in hvsock_canwrite_check()
1387 return (rounddown2(ret, 8)); in hvsock_canwrite_check()
1410 sndbuf = rounddown2(sndbuf, PAGE_SIZE); in hvsock_open_channel()
1413 rcvbuf = rounddown2(rcvbuf, PAGE_SIZE); in hvsock_open_channel()
/freebsd/libexec/rtld-elf/
H A Drtld_malloc.c303 offset = (uintptr_t)pagepool_start - rounddown2( in morepages()
/freebsd/stand/libsa/geli/
H A Dgelidev.c133 alnstart = rounddown2(reqstart, (int)gdesc->gdev->md.md_sectorsize); in geli_dev_strategy()
/freebsd/sys/amd64/linux32/
H A Dlinux32_sysvec.c633 destp = rounddown2(destp, sizeof(uint32_t)); in linux_copyout_strings()
650 destp = rounddown2(destp, sizeof(uint32_t)); in linux_copyout_strings()
659 destp = rounddown2(destp, sizeof(uint32_t)); in linux_copyout_strings()
/freebsd/sys/dev/usb/
H A Dusb_busdma.c460 pg->physaddr = rounddown2(segs->ds_addr, USB_PAGE_SIZE); in usb_pc_common_mem_cb()
495 pg->physaddr = rounddown2(segs->ds_addr + off, USB_PAGE_SIZE); in usb_pc_common_mem_cb()
/freebsd/usr.sbin/makefs/
H A Dzfs.c153 vdevsize = rounddown2(fsopts->maxsize, 1 << zfs->ashift); in zfs_size_vdev()
189 vdevsize1 = rounddown2(asize, mssize) + VDEV_LABEL_SPACE; in zfs_size_vdev()
/freebsd/sys/geom/part/
H A Dg_part_bsd64.c451 rounddown2(pp->mediasize - table->d_bbase * pp->sectorsize, in g_part_bsd64_resize()
480 v = rounddown2(pp->sectorsize + offsetof(struct disklabel64, d_magic), in g_part_bsd64_probe()
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dkernel.h124 #define ALIGN_DOWN(x, y) rounddown2(x, y)
/freebsd/sys/geom/bde/
H A Dg_bde_crypt.c
/freebsd/sys/ufs/ufs/
H A Dufs_lookup.c558 dp->i_diroff = rounddown2(i_offset, DIRBLKSIZ); in ufs_lookup_ino()
1062 rounddown2(I_OFFSET(dp), DIRBLKSIZ)); in ufs_direnter()
1190 rounddown2(I_OFFSET(dp), DIRBLKSIZ)); in ufs_dirremove()
/freebsd/lib/libkvm/
H A Dkvm_minidump_aarch64.c49 #define aarch64_trunc_page(x, size) rounddown2((kvaddr_t)(x), size)

123