Home
last modified time | relevance | path

Searched refs:order_base_2 (Results 1 – 25 of 134) sorted by relevance

123456

/linux-6.6.21/include/linux/
Dlog2.h217 #define order_base_2(n) \ macro
231 return order_base_2(n) + 1; in __bits_per()
232 return order_base_2(n); in __bits_per()
Dhugetlb_cgroup.h30 #define HUGETLB_CGROUP_MIN_ORDER order_base_2(__NR_USED_SUBPAGE)
/linux-6.6.21/mm/
Dpercpu-km.c65 pages = alloc_pages(gfp, order_base_2(nr_pages)); in pcpu_create_chunk()
98 __free_pages(chunk->data, order_base_2(nr_pages)); in pcpu_destroy_chunk()
/linux-6.6.21/drivers/watchdog/
Dimgpdc_wdt.c120 val |= order_base_2(wdt->wdt_dev.timeout * clk_rate) - 1; in __pdc_wdt_set_timeout()
213 if (order_base_2(clk_rate) > PDC_WDT_CONFIG_DELAY_MASK + 1) { in pdc_wdt_probe()
218 if (order_base_2(clk_rate) == 0) in pdc_wdt_probe()
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/
Dparams.c21 u8 req_page_shift = xsk ? order_base_2(xsk->chunk_size) : PAGE_SHIFT; in mlx5e_mpwrq_page_shift()
282 order_base_2(linear_stride_sz); in mlx5e_mpwqe_log_pkts_per_wqe()
354 log_stride_sz = order_base_2(mlx5e_rx_get_linear_stride_sz(mdev, params, xsk, true)); in mlx5e_rx_mpwqe_is_linear_skb()
398 return order_base_2(DIV_ROUND_UP(MLX5E_RX_MAX_HEAD, MLX5E_SHAMPO_WQ_BASE_HEAD_ENTRY_SIZE)); in mlx5e_shampo_get_log_hd_entry_size()
404 return order_base_2(MLX5E_SHAMPO_WQ_RESRV_SIZE / MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE); in mlx5e_shampo_get_log_rsrv_size()
413 return order_base_2(DIV_ROUND_UP(resrv_size, params->sw_mtu)); in mlx5e_shampo_get_log_pkt_per_rsrv()
421 return order_base_2(mlx5e_rx_get_linear_stride_sz(mdev, params, xsk, true)); in mlx5e_mpwqe_get_log_stride_size()
848 info->log_num_frags = order_base_2(info->num_frags); in mlx5e_build_rq_frags_info()
867 return order_base_2(sz); in mlx5e_get_rqwq_log_stride()
894 return order_base_2((wqe_size / rsrv_size) * wq_size * (pkt_per_rsrv + 1)); in mlx5e_shampo_get_log_cq_size()
[all …]
/linux-6.6.21/drivers/gpu/drm/etnaviv/
Detnaviv_cmdbuf.c93 order = order_base_2(ALIGN(size, SUBALLOC_GRANULE) / SUBALLOC_GRANULE); in etnaviv_cmdbuf_init()
121 int order = order_base_2(ALIGN(cmdbuf->size, SUBALLOC_GRANULE) / in etnaviv_cmdbuf_free()
/linux-6.6.21/drivers/infiniband/hw/hns/
Dhns_roce_alloc.c89 buf->trunk_shift = order_base_2(ALIGN(size, PAGE_SIZE)); in hns_roce_buf_alloc()
92 buf->trunk_shift = order_base_2(ALIGN(page_size, PAGE_SIZE)); in hns_roce_buf_alloc()
/linux-6.6.21/kernel/
Dbounds.c26 DEFINE(LRU_GEN_WIDTH, order_base_2(MAX_NR_GENS + 1)); in main()
/linux-6.6.21/drivers/clk/sunxi/
Dclk-sun9i-core.c161 _p = order_base_2(DIV_ROUND_UP(req->parent_rate, req->rate)); in sun9i_a80_get_ahb_factors()
247 req->p = order_base_2(div); in sun9i_a80_get_apb1_factors()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/abm/
Dcls.c127 bits_per_prio = roundup_pow_of_two(order_base_2(abm->num_bands)); in nfp_abm_update_band_map()
132 base_shift = 8 - order_base_2(abm->num_prios); in nfp_abm_update_band_map()
Dctrl.c319 size = roundup_pow_of_two(order_base_2(abm->num_bands)); in nfp_abm_ctrl_prio_map_size()
392 abm->dscp_mask = GENMASK(7, 8 - order_base_2(abm->num_prios)); in nfp_abm_ctrl_find_addrs()
/linux-6.6.21/drivers/gpu/drm/amd/amdkfd/
Dkfd_mqd_manager_cik.c191 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in __update_mqd()
230 m->sdma_rlc_rb_cntl = order_base_2(q->queue_size / 4) in update_mqd_sdma()
351 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in update_mqd_hiq()
Dkfd_mqd_manager_vi.c181 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in __update_mqd()
213 order_base_2(q->eop_ring_buffer_size / 4) - 1); in __update_mqd()
364 m->sdmax_rlcx_rb_cntl = order_base_2(q->queue_size / 4) in update_mqd_sdma()
Dkfd_mqd_manager_v9.c247 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in update_mqd()
280 min(0xA, order_base_2(q->eop_ring_buffer_size / 4) - 1) : 0; in update_mqd()
463 m->sdmax_rlcx_rb_cntl = order_base_2(q->queue_size / 4) in update_mqd_sdma()
/linux-6.6.21/drivers/net/ethernet/marvell/octeontx2/nic/
Dqos.h42 DECLARE_HASHTABLE(qos_hlist, order_base_2(OTX2_QOS_MAX_LEAF_NODES));
/linux-6.6.21/arch/powerpc/kvm/
Dbook3s_hv_builtin.c60 VM_BUG_ON(order_base_2(nr_pages) < KVM_CMA_CHUNK_ORDER - PAGE_SHIFT); in kvm_alloc_hpt_cma()
62 return cma_alloc(kvm_cma, nr_pages, order_base_2(HPT_ALIGN_PAGES), in kvm_alloc_hpt_cma()
/linux-6.6.21/drivers/pci/controller/
Dpcie-xilinx.c240 hwirq = bitmap_find_free_region(pcie->msi_map, XILINX_NUM_MSI_IRQS, order_base_2(nr_irqs)); in xilinx_msi_domain_alloc()
263 bitmap_release_region(pcie->msi_map, d->hwirq, order_base_2(nr_irqs)); in xilinx_msi_domain_free()
Dpcie-iproc-msi.c263 order_base_2(msi->nr_cpus * nr_irqs)); in iproc_msi_irq_domain_alloc()
291 order_base_2(msi->nr_cpus * nr_irqs)); in iproc_msi_irq_domain_free()
/linux-6.6.21/drivers/gpu/drm/nouveau/nvkm/core/
Dramht.c153 ramht->bits = order_base_2(ramht->size); in nvkm_ramht_new()
/linux-6.6.21/drivers/pwm/
Dpwm-sl28cpld.c144 prescaler = order_base_2(prescaler); in sl28cpld_pwm_apply()
/linux-6.6.21/drivers/infiniband/sw/rxe/
Drxe_queue.c81 q->log2_elem_size = order_base_2(elem_size); in rxe_queue_init()
/linux-6.6.21/drivers/irqchip/
Dirq-armada-370-xp.c250 order_base_2(nr_irqs)); in armada_370_xp_msi_alloc()
272 bitmap_release_region(msi_used, d->hwirq, order_base_2(nr_irqs)); in armada_370_xp_msi_free()
/linux-6.6.21/drivers/gpu/drm/
Ddrm_bufs.c254 map->size, order_base_2(map->size), map->handle); in drm_addmap_core()
737 order = order_base_2(request->size); in drm_legacy_addbufs_agp()
908 order = order_base_2(request->size); in drm_legacy_addbufs_pci()
1128 order = order_base_2(request->size); in drm_legacy_addbufs_sg()
1422 order = order_base_2(request->size); in drm_legacy_markbufs()
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Dsi_ih.c77 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in si_ih_irq_init()
Dcik_ih.c127 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in cik_ih_irq_init()

123456