Home
last modified time | relevance | path

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

12

/f-stack/tools/compat/
H A Dcompat.h60 #ifndef powerof2
61 #define powerof2(x) ((((x)-1)&(x))==0) macro
/f-stack/freebsd/kern/
H A Dsubr_bufring.c44 KASSERT(powerof2(count), ("buf ring must be size power of 2")); in buf_ring_alloc()
H A Dkern_mtxpool.c136 if (pool_size <= 0 || !powerof2(pool_size)) { in mtx_pool_create()
H A Dsubr_sbuf.c145 CTASSERT(powerof2(SBUF_MAXEXTENDSIZE));
146 CTASSERT(powerof2(SBUF_MAXEXTENDINCR));
H A Dkern_malloc.c773 KASSERT(align != 0 && powerof2(align), in malloc_domainset_aligned()
1184 if (powerof2(size) && size > sizeof(void *)) in mallocinit()
/f-stack/freebsd/i386/i386/
H A Dk6_mem.c87 if (desc->mr_len < 131072 || !powerof2(desc->mr_len)) in k6_mrmake()
/f-stack/freebsd/vm/
H A Dvm_phys.c1245 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_phys_scan_contig()
1246 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_phys_scan_contig()
1372 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_phys_alloc_contig()
1373 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_phys_alloc_contig()
1417 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_phys_alloc_seg_contig()
1418 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_phys_alloc_seg_contig()
H A Dvm_page.c2581 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_page_scan_contig()
2582 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_page_scan_contig()
2939 CTASSERT(powerof2(NRUNS));
2979 KASSERT(powerof2(alignment), ("alignment is not a power of 2")); in vm_page_reclaim_contig_domain()
2980 KASSERT(powerof2(boundary), ("boundary is not a power of 2")); in vm_page_reclaim_contig_domain()
/f-stack/freebsd/sys/
H A Dparam.h311 #define powerof2(x) ((((x)-1)&(x))==0) macro
/f-stack/freebsd/i386/pci/
H A Dpci_pir.c520 if (pci_link->pl_irqmask != 0 && powerof2(pci_link->pl_irqmask)) in pci_pir_route_interrupt()
546 if (error && !powerof2(pci_link->pl_irqmask)) { in pci_pir_route_interrupt()
/f-stack/freebsd/arm/annapurna/alpine/
H A Dalpine_pci_msix.c307 if ((powerof2(count) == 0) || (count > 8)) in al_msix_alloc_msi()
/f-stack/freebsd/x86/iommu/
H A Dintel_intrmap.c325 return (powerof2(v) ? v : 1 << fls(v)); in clp2()
H A Dintel_utils.c531 powerof2(unit->irte_cnt), in dmar_load_irt_ptr()
/f-stack/freebsd/amd64/vmm/
H A Dx86.c86 return (fls(x << (1 - powerof2(x))) - 1); in log2()
/f-stack/freebsd/x86/x86/
H A Dlocal_apic.c1353 KASSERT(powerof2(divisor), ("lapic: invalid divisor %u", divisor)); in lapic_timer_set_divisor()
1559 KASSERT(powerof2(count), ("bad count")); in native_apic_alloc_vectors()
1560 KASSERT(powerof2(align), ("bad align")); in native_apic_alloc_vectors()
H A Dx86_mem.c69 powerof2((len)) && /* ... and power of two */ \
H A Dmp_x86.c194 return (fls(x << (1 - powerof2(x))) - 1); in mask_width()
/f-stack/freebsd/arm/arm/
H A Dgic.c1090 KASSERT(powerof2(count), ("%s: bad count", __func__)); in arm_gicv2m_alloc_msi()
1091 KASSERT(powerof2(maxcount), ("%s: bad maxcount", __func__)); in arm_gicv2m_alloc_msi()
H A Dbusdma_machdep.c463 KASSERT(boundary == 0 || powerof2(boundary), in bus_dma_tag_create()
467 KASSERT(alignment != 0 && powerof2(alignment), in bus_dma_tag_create()
/f-stack/freebsd/netinet/
H A Dtcp_hostcache.c210 if (!powerof2(V_tcp_hostcache.hashsize)) { in tcp_hc_init()
H A Dtcp_fastopen.c406 !powerof2(V_tcp_fastopen_ccache_buckets)) in tcp_fastopen_init()
/f-stack/freebsd/arm64/arm64/
H A Dgic_v3.c1324 KASSERT(powerof2(count), ("%s: bad count", __func__)); in gic_v3_alloc_msi()
1325 KASSERT(powerof2(maxcount), ("%s: bad maxcount", __func__)); in gic_v3_alloc_msi()
/f-stack/freebsd/arm/nvidia/
H A Dtegra_pcie.c751 KASSERT(powerof2(count), ("%s: bad count", __func__)); in tegra_pcib_msi_alloc_msi()
752 KASSERT(powerof2(maxcount), ("%s: bad maxcount", __func__)); in tegra_pcib_msi_alloc_msi()
/f-stack/freebsd/net/
H A Diflib.c4585 if (!powerof2(scctx->isc_nrxd[i])) { in iflib_reset_qvalues()
4603 if (!powerof2(scctx->isc_ntxd[i])) { in iflib_reset_qvalues()
5443 MPASS(powerof2(sctx->isc_nrxd_min[i])); in _iflib_assert()
5445 MPASS(powerof2(sctx->isc_nrxd_max[i])); in _iflib_assert()
5447 MPASS(powerof2(sctx->isc_nrxd_default[i])); in _iflib_assert()
5453 MPASS(powerof2(sctx->isc_ntxd_min[i])); in _iflib_assert()
5455 MPASS(powerof2(sctx->isc_ntxd_max[i])); in _iflib_assert()
5457 MPASS(powerof2(sctx->isc_ntxd_default[i])); in _iflib_assert()
/f-stack/freebsd/netpfil/ipfw/nat64/
H A Dnat64lsn_control.c101 else if (!powerof2(uc->states_chunks)) in nat64lsn_default_config()

12