Home
last modified time | relevance | path

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

123

/freebsd/contrib/netbsd-tests/include/sys/
H A Dt_bitops.c190 ATF_REQUIRE(ilog2(x) == i); in ATF_TC_BODY()
207 ATF_REQUIRE(ilog2(x) == i); in ATF_TC_BODY()
223 ATF_REQUIRE(ilog2(0x0000000000000001ULL) == 0); in ATF_TC_BODY()
224 ATF_REQUIRE(ilog2(0x0000000000000002ULL) == 1); in ATF_TC_BODY()
225 ATF_REQUIRE(ilog2(0x0000000000000004ULL) == 2); in ATF_TC_BODY()
226 ATF_REQUIRE(ilog2(0x0000000000000008ULL) == 3); in ATF_TC_BODY()
227 ATF_REQUIRE(ilog2(0x0000000000000010ULL) == 4); in ATF_TC_BODY()
228 ATF_REQUIRE(ilog2(0x0000000000000020ULL) == 5); in ATF_TC_BODY()
229 ATF_REQUIRE(ilog2(0x0000000000000040ULL) == 6); in ATF_TC_BODY()
230 ATF_REQUIRE(ilog2(0x0000000000000080ULL) == 7); in ATF_TC_BODY()
[all …]
/freebsd/sys/dev/mlx4/mlx4_en/
H A Dmlx4_en_resources.c53 context->rq_size_stride = ilog2(size) << 3 | (ilog2(stride) - 4); in mlx4_en_fill_qp_context()
55 context->sq_size_stride = ilog2(size) << 3 | (ilog2(stride) - 4); in mlx4_en_fill_qp_context()
57 context->sq_size_stride = ilog2(TXBB_SIZE) - 4; in mlx4_en_fill_qp_context()
/freebsd/contrib/ofed/libirdma/
H A Dosdep.h61 hlist_for_each_entry_rcu(o, &n[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(n)))],\
64 hlist_for_each_entry(o, &n[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(n)))],\
67 hlist_add_head_rcu(n, &h[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(h)))])
70 hlist_add_head(n, &h[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(h)))])
/freebsd/sys/dev/irdma/
H A Dosdep.h68 hlist_for_each_entry_rcu(o, &n[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(n)))],\
71 hlist_for_each_entry(o, &n[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(n)))],\
74 hlist_add_head_rcu(n, &h[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(h)))])
77 hlist_add_head(n, &h[jhash(&k, sizeof(k), 0) >> (32 - ilog2(ARRAY_SIZE(h)))])
/freebsd/sys/contrib/openzfs/cmd/raidz_test/
H A Draidz_test.h89 static inline size_t ilog2(size_t a) in ilog2() function
91 return (a > 1 ? 1 + ilog2(a >> 1) : 0); in ilog2()
H A Draidz_test.c97 ilog2(opts->rto_offset), /* -o */ in print_opts()
101 ilog2(opts->rto_dsize), /* -s */ in print_opts()
129 ilog2(o->rto_offset), /* -o */ in usage()
131 ilog2(o->rto_dsize), /* -s */ in usage()
/freebsd/sys/dev/mlx4/mlx4_core/
H A Dmlx4_profile.c119 profile[i].log_num = ilog2(profile[i].num); in mlx4_make_profile()
205 init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); in mlx4_make_profile()
225 ilog2(mlx4_get_mgm_entry_size(dev)); in mlx4_make_profile()
H A Dmlx4_cq.c152 cq_context->logsize_usrpage = cpu_to_be32(ilog2(entries) << 24); in mlx4_cq_resize()
276 cpu_to_be32((ilog2(nent) << 24) | in mlx4_cq_alloc()
/freebsd/sys/amd64/amd64/
H A Dfpu.c1306 KASSERT(ilog2(feature) <= ilog2(mask), in xsave_extfeature_check()
1319 KASSERT(xstate_bv != 0 && ilog2(xstate_bv) <= ilog2(mask), in xsave_extstate_bv_check()
1340 idx = ilog2(feature); in xsave_extfeature_supported()
1372 idx = ilog2(feature); in xsave_area_offset()
1400 last_idx = ilog2(xstate_bv); in xsave_area_size()
/freebsd/sys/dev/mlx5/mlx5_ib/
H A Dmlx5_ib_mem.c130 unsigned long umem_page_shift = ilog2(umem->page_size); in __mlx5_ib_populate_pas()
199 *offset = buf_off >> ilog2(off_size); in mlx5_ib_get_buf_offset()
H A Dmlx5_ib_srq.c275 srq->msrq.wqe_shift = ilog2(desc_size); in mlx5_ib_create_srq()
293 in.log_size = ilog2(srq->msrq.max); in mlx5_ib_create_srq()
/freebsd/sys/sys/
H A Dlibkern.h228 #define ilog2(n) (__builtin_constant_p(n) ? ilog2_const(n) : ilog2_var(n)) macro
229 #define rounddown_pow_of_two(n) ((__typeof(n))1 << ilog2(n))
230 #define order_base_2(n) ilog2(2*(n)-1)
/freebsd/sys/dev/mlx5/mlx5_fpga/
H A Dmlx5fpga_conn.c439 MLX5_SET(cqc, temp_cqc, log_cq_size, ilog2(cq_size)); in mlx5_fpga_conn_create_cq()
467 MLX5_SET(cqc, cqc, log_cq_size, ilog2(cq_size)); in mlx5_fpga_conn_create_cq()
543 MLX5_SET(qpc, temp_qpc, log_rq_stride, ilog2(MLX5_SEND_WQE_DS) - 4); in mlx5_fpga_conn_create_qp()
544 MLX5_SET(qpc, temp_qpc, log_rq_size, ilog2(conn->qp.rq.size)); in mlx5_fpga_conn_create_qp()
545 MLX5_SET(qpc, temp_qpc, log_sq_size, ilog2(conn->qp.sq.size)); in mlx5_fpga_conn_create_qp()
582 MLX5_SET(qpc, qpc, log_rq_stride, ilog2(MLX5_SEND_WQE_DS) - 4); in mlx5_fpga_conn_create_qp()
583 MLX5_SET(qpc, qpc, log_rq_size, ilog2(conn->qp.rq.size)); in mlx5_fpga_conn_create_qp()
585 MLX5_SET(qpc, qpc, log_sq_size, ilog2(conn->qp.sq.size)); in mlx5_fpga_conn_create_qp()
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Daverage.h75 int d = ilog2(_d); \
H A Dhashtable.h61 #define HASH_BITS(name) ilog2(HASH_SIZE(name))
/freebsd/sys/contrib/dev/iwlwifi/
H A Diwl-fh.h562 #define RX_QUEUE_CB_SIZE(x) ilog2(x)
593 #define TFD_QUEUE_CB_SIZE(x) (ilog2(x) - 3)
/freebsd/sys/x86/iommu/
H A Damd_cmd.c323 unit->x86c.qi_buf_maxsz = ilog2(AMDIOMMU_CMDBUF_MAX / PAGE_SIZE); in amdiommu_init_cmd()
337 qi_sz = ilog2(unit->x86c.inv_queue_size / PAGE_SIZE) + 8; in amdiommu_init_cmd()
/freebsd/sbin/newfs/
H A Dmkfs.c102 static int ilog2(int);
258 sblock.fs_bshift = ilog2(sblock.fs_bsize); in mkfs()
259 sblock.fs_fshift = ilog2(sblock.fs_fsize); in mkfs()
261 sblock.fs_fragshift = ilog2(sblock.fs_frag); in mkfs()
267 sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize); in mkfs()
1204 ilog2(int val) in charsperline()
1211 errx(1, "ilog2: %d is not a power of 2\n", val); in ilog2()
1208 ilog2(int val) ilog2() function
/freebsd/sys/dev/mlx4/mlx4_ib/
H A Dmlx4_ib_srq.c103 srq->msrq.wqe_shift = ilog2(desc_size); in mlx4_ib_create_srq()
119 ilog2(srq->umem->page_size), &srq->mtt); in mlx4_ib_create_srq()
H A Dmlx4_ib_mr.c161 shift = ilog2(mr->umem->page_size); in mlx4_ib_reg_user_mr()
245 shift = ilog2(mmr->umem->page_size); in mlx4_ib_rereg_user_mr()
/freebsd/sys/riscv/eswin/
H A Deswin_reset.c165 *id |= ilog2(cells[1]); in eswin_rst_map()
/freebsd/sys/contrib/dev/athk/ath10k/
H A Dswap.c117 seg_info->seg_hw_info.size_log2 = __cpu_to_le32(ilog2(swap_bin_len)); in ath10k_swap_code_seg_alloc()
/freebsd/sys/kern/
H A Dsubr_pctrie.c407 child->pn_clev = rounddown(ilog2(index ^ newind), PCTRIE_WIDTH); in pctrie_insert_node()
758 slot = ilog2(node->pn_popmap & ((1 << slot) - 1)); in _pctrie_lookup_le()
768 slot = ilog2(node->pn_popmap); in _pctrie_lookup_le()
/freebsd/sys/vm/
H A Dvm_phys.c767 ((PAGE_SIZE << ilog2(npages)) - 1)) == 0, in vm_phys_enq_beg()
774 order = ilog2(npages); in vm_phys_enq_beg()
804 ((PAGE_SIZE << ilog2(npages)) - 1)) == 0, in vm_phys_enq_range()
1392 order = min(ilog2(diff), VM_NFREEORDER - 1); in vm_phys_enqueue_contig()
1427 max_order = min(ilog2(lo ^ (lo + npages)), VM_NFREEORDER - 1); in vm_phys_free_contig()
/freebsd/usr.sbin/makefs/ffs/
H A Dmkfs.c70 static int ilog2(int);
271 sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize); in ffs_mkfs()
865 ilog2(int val) in ilog2() function

123