Home
last modified time | relevance | path

Searched refs:powerof2 (Results 1 – 25 of 86) sorted by relevance

1234

/freebsd/tools/build/cross-build/include/common/sys/
H A Dparam.h87 #ifndef powerof2
88 #define powerof2(x) ((((x)-1) & (x)) == 0) macro
/freebsd/sys/vm/
H A Dvm_extern.h141 KASSERT(powerof2(alignment), ("%s: alignment is not a power of 2: %#lx",
153 KASSERT(powerof2(boundary), ("%s: boundary is not a power of 2: %#jx",
H A Dvm_reserv.c1131 KASSERT(powerof2(npages), in vm_reserv_is_populated()
1264 KASSERT(ppn_align != 0 && powerof2(ppn_align), in vm_reserv_find_contig()
1266 KASSERT(ppn_bound != 0 && powerof2(ppn_bound), in vm_reserv_find_contig()
1299 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_reserv_reclaim_contig()
1300 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_reserv_reclaim_contig()
H A Dvm_phys.c1626 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_phys_find_queues_contig()
1627 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_phys_find_queues_contig()
1685 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_phys_alloc_contig()
1686 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_phys_alloc_contig()
/freebsd/sys/kern/
H A Dsubr_bufring.c41 KASSERT(powerof2(count), ("buf ring must be size power of 2")); in buf_ring_alloc()
H A Dkern_mtxpool.c133 if (pool_size <= 0 || !powerof2(pool_size)) { in mtx_pool_create()
H A Dsubr_pctrie.c119 KASSERT(powerof2(node->pn_popmap), in pctrie_node_put()
550 KASSERT(!powerof2(node->pn_popmap), in _pctrie_iter_lookup_node()
1048 if (!powerof2(node->pn_popmap)) in pctrie_remove()
H A Dsubr_sbuf.c142 CTASSERT(powerof2(SBUF_MAXEXTENDSIZE));
143 CTASSERT(powerof2(SBUF_MAXEXTENDINCR));
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dbuild_bug.h58 #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x))
H A Daverage.h58 CTASSERT(_d > 0 && powerof2(_d)); \
/freebsd/usr.sbin/makefs/zfs/
H A Dvdev.c53 assert(powerof2(size)); in blkptr_set()
87 assert(powerof2(len)); in vdev_pwrite()
277 assert(powerof2(zfs->mssize)); in vdev_spacemap_init()
/freebsd/usr.sbin/makefs/
H A Dzfs.c178 if (!powerof2(mssize)) in zfs_size_vdev()
181 if (!powerof2(mssize)) in zfs_size_vdev()
654 powerof2(size) ? size : (1l << flsll(size)))); in dnode_cursor_init()
656 assert(powerof2(blksz)); in dnode_cursor_init()
/freebsd/sbin/fsck_msdosfs/
H A Dboot.c72 !powerof2(boot->bpbBytesPerSec)) { in readboot()
79 if (boot->bpbSecPerClust == 0 || !powerof2(boot->bpbSecPerClust)) { in readboot()
/freebsd/lib/libc/stdio/
H A Dgetdelim.c46 if (!powerof2(n)) { in p2roundup()
/freebsd/sbin/newfs_msdos/
H A Dmkfs_msdos.c351 !powerof2(bpb.bpbBytesPerSec)) { in mkfs_msdos()
381 if (!powerof2(o.block_size)) { in mkfs_msdos()
398 if (!powerof2(o.sectors_per_cluster)) { in mkfs_msdos()
877 static_assert(powerof2(MAXBPS), "MAXBPS is not power of 2"); in getchunksize()
878 assert(powerof2(chunksize)); in getchunksize()
/freebsd/sys/i386/i386/
H A Dk6_mem.c84 if (desc->mr_len < 131072 || !powerof2(desc->mr_len)) in k6_mrmake()
/freebsd/sys/dev/iicbus/mux/
H A Dpca954x.c144 KASSERT(en > 0 && powerof2(en), ("%s: %s enable %#x " in pca954x_bus_select()
/freebsd/sys/sys/
H A Dparam.h318 #define powerof2(x) ((((x)-1)&(x))==0) macro
H A Dbuf_ring.h373 KASSERT(powerof2(count), ("buf ring must be size power of 2")); in buf_ring_alloc()
/freebsd/sys/ufs/ffs/
H A Dffs_subr.c407 FCHK(powerof2(fs->fs_fsize), ==, 0, %jd); in validate_sblock()
488 FCHK(powerof2(fs->fs_bsize), ==, 0, %jd); in validate_sblock()
494 FCHK(powerof2(fs->fs_fsize), ==, 0, %jd); in validate_sblock()
513 FCHK(powerof2(fs->fs_maxbsize), ==, 0, %jd); in validate_sblock()
/freebsd/sys/i386/pci/
H A Dpci_pir.c517 if (pci_link->pl_irqmask != 0 && powerof2(pci_link->pl_irqmask)) in pci_pir_route_interrupt()
543 if (error && !powerof2(pci_link->pl_irqmask)) { in pci_pir_route_interrupt()
/freebsd/tools/test/buf_ring/
H A Dbuf_ring_test.c236 if (!powerof2(size)) { in main()
/freebsd/sys/x86/iommu/
H A Damd_event.c275 !powerof2(unit->event_log_size)) in amdiommu_init_event()
H A Damd_intrmap.c314 powerof2(unit->irte_nentries), in amdiommu_ctx_init_irte()
/freebsd/sys/arm/annapurna/alpine/
H A Dalpine_pci_msix.c302 if ((powerof2(count) == 0) || (count > 8)) in al_msix_alloc_msi()

1234