Home
last modified time | relevance | path

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

12345678910>>...23

/linux-6.6.21/include/linux/
Dlog2.h156 #define ilog2(n) \ macro
178 (1UL << (ilog2((n) - 1) + 1)) \
194 (1UL << ilog2(n))) : \
201 return n > 1 ? ilog2(n - 1) + 1 : 0; in __order_base_2()
221 ilog2((n) - 1) + 1) : \
254 ? 1 : ilog2(n) + 1 \
Dt10-pi.h42 unsigned int shift = ilog2(queue_logical_block_size(rq->q)); in t10_pi_ref_tag()
73 unsigned int shift = ilog2(queue_logical_block_size(rq->q)); in ext_pi_ref_tag()
Dassoc_array_priv.h19 #define ASSOC_ARRAY_LEVEL_STEP (ilog2(ASSOC_ARRAY_FAN_OUT))
22 #define ASSOC_ARRAY_KEY_CHUNK_SHIFT (ilog2(BITS_PER_LONG))
/linux-6.6.21/fs/proc/
Dtask_mmu.c647 [ilog2(VM_READ)] = "rd", in show_smap_vma_flags()
648 [ilog2(VM_WRITE)] = "wr", in show_smap_vma_flags()
649 [ilog2(VM_EXEC)] = "ex", in show_smap_vma_flags()
650 [ilog2(VM_SHARED)] = "sh", in show_smap_vma_flags()
651 [ilog2(VM_MAYREAD)] = "mr", in show_smap_vma_flags()
652 [ilog2(VM_MAYWRITE)] = "mw", in show_smap_vma_flags()
653 [ilog2(VM_MAYEXEC)] = "me", in show_smap_vma_flags()
654 [ilog2(VM_MAYSHARE)] = "ms", in show_smap_vma_flags()
655 [ilog2(VM_GROWSDOWN)] = "gd", in show_smap_vma_flags()
656 [ilog2(VM_PFNMAP)] = "pf", in show_smap_vma_flags()
[all …]
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx4/
Den_resources.c52 context->rq_size_stride = ilog2(size) << 3 | (ilog2(stride) - 4); in mlx4_en_fill_qp_context()
54 context->sq_size_stride = ilog2(size) << 3 | (ilog2(stride) - 4); in mlx4_en_fill_qp_context()
59 context->sq_size_stride = ilog2(TXBB_SIZE) - 4; in mlx4_en_fill_qp_context()
/linux-6.6.21/tools/include/linux/
Dlog2.h71 #define ilog2(n) \ macro
155 (1UL << (ilog2((n) - 1) + 1)) \
171 (1UL << ilog2(n))) : \
/linux-6.6.21/arch/um/kernel/skas/
Dmmu.c24 stack = __get_free_pages(GFP_KERNEL | __GFP_ZERO, ilog2(STUB_DATA_PAGES)); in init_new_context()
55 free_pages(to_mm->id.stack, ilog2(STUB_DATA_PAGES)); in init_new_context()
77 free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES)); in destroy_context()
/linux-6.6.21/lib/math/
Ddiv64.c192 if (ilog2(a) + ilog2(b) > 62) { in mul_u64_u64_div_u64()
212 shift = ilog2(a) + ilog2(b) - 62; in mul_u64_u64_div_u64()
/linux-6.6.21/arch/powerpc/include/asm/
Dcpufeature.h24 #define PPC_MODULE_FEATURE_VEC_CRYPTO (32 + ilog2(PPC_FEATURE2_VEC_CRYPTO))
25 #define PPC_MODULE_FEATURE_P10 (32 + ilog2(PPC_FEATURE2_ARCH_3_1))
/linux-6.6.21/arch/arm/include/asm/
Dcpufeature.h26 #define __hwcap_feature(x) ilog2(HWCAP_ ## x)
27 #define __hwcap2_feature(x) (32 + ilog2(HWCAP2_ ## x))
/linux-6.6.21/include/asm-generic/
Ddiv64.h80 ___p = 1 << ilog2(___b); \
137 ___p >>= ilog2(___bits); \
138 ___m >>= ilog2(___bits); \
226 (n) >>= ilog2(__base); \
/linux-6.6.21/lib/
Dgeneric-radix-tree.c8 #define GENRADIX_ARY_SHIFT ilog2(GENRADIX_ARY)
60 if (ilog2(offset) >= genradix_depth_shift(level)) in __genradix_ptr()
118 if (n && ilog2(offset) < genradix_depth_shift(level)) in __genradix_ptr_alloc()
181 if (ilog2(iter->offset) >= genradix_depth_shift(level)) in __genradix_iter_peek()
/linux-6.6.21/drivers/media/pci/tw5864/
Dtw5864-h264.c114 bs_write_ue(s, ilog2(MAX_GOP_SIZE) - 4); /* log2_max_frame_num_minus4 */ in tw5864_h264_gen_sps_rbsp()
117 bs_write_ue(s, ilog2(MAX_GOP_SIZE) - 4); in tw5864_h264_gen_sps_rbsp()
168 bs_write(s, ilog2(MAX_GOP_SIZE), frame_gop_seqno); /* frame_num */ in tw5864_h264_gen_slice_head()
173 bs_write(s, ilog2(MAX_GOP_SIZE), frame_gop_seqno); in tw5864_h264_gen_slice_head()
/linux-6.6.21/drivers/pci/endpoint/
Dpci-epc-mem.c26 unsigned int page_shift = ilog2(mem->window.page_size); in pci_epc_mem_get_order()
73 page_shift = ilog2(page_size); in pci_epc_multi_mem_init()
198 page_shift = ilog2(mem->window.page_size); in pci_epc_mem_alloc_addr()
260 page_shift = ilog2(page_size); in pci_epc_mem_free_addr()
/linux-6.6.21/net/ethtool/
Dtunnels.c16 static_assert(ETHTOOL_UDP_TUNNEL_TYPE_VXLAN == ilog2(UDP_TUNNEL_TYPE_VXLAN));
17 static_assert(ETHTOOL_UDP_TUNNEL_TYPE_GENEVE == ilog2(UDP_TUNNEL_TYPE_GENEVE));
19 ilog2(UDP_TUNNEL_TYPE_VXLAN_GPE));
145 ilog2(UDP_TUNNEL_TYPE_VXLAN))) in ethnl_tunnel_info_fill_reply()
/linux-6.6.21/arch/mips/mm/
Dtlbex.c371 UASM_i_SLL(p, K0, K0, ilog2(sizeof(struct tlb_reg_save))); in build_get_work_registers()
612 UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL)); in build_convert_pte_to_entrylo()
614 UASM_i_SRL(p, reg, reg, ilog2(_PAGE_NO_EXEC)); in build_convert_pte_to_entrylo()
616 ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); in build_convert_pte_to_entrylo()
620 uasm_i_dsrl_safe(p, reg, reg, ilog2(_PAGE_GLOBAL)); in build_convert_pte_to_entrylo()
622 UASM_i_SRL(p, reg, reg, ilog2(_PAGE_GLOBAL)); in build_convert_pte_to_entrylo()
702 uasm_il_bbit1(p, r, tmp, ilog2(_PAGE_HUGE), lid); in build_is_huge_pte()
1023 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); in build_update_entries()
1033 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); in build_update_entries()
1197 uasm_il_bbit1(p, r, scratch, ilog2(_PAGE_HUGE), label_tlb_huge_update); in build_fast_tlb_refill_handler()
[all …]
/linux-6.6.21/drivers/mtd/spi-nor/
Dswp.c41 bp_slots_needed = ilog2(nor->info->n_sectors); in spi_nor_get_min_prot_length_sr()
201 pow = ilog2(lock_len) - ilog2(min_prot_len) + 1; in spi_nor_sr_lock()
291 pow = ilog2(lock_len) - ilog2(min_prot_len) + 1; in spi_nor_sr_unlock()
/linux-6.6.21/drivers/scsi/
Dsd.h208 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors()
218 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical()
223 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
/linux-6.6.21/tools/testing/selftests/mm/
Dthuge-gen.c54 int ilog2(unsigned long v) in ilog2() function
220 int arg = ilog2(ps) << MAP_HUGE_SHIFT; in main()
232 int arg = ilog2(ps) << SHM_HUGE_SHIFT; in main()
/linux-6.6.21/drivers/gpu/drm/
Ddrm_buddy.c116 mm->max_order = ilog2(size) - ilog2(chunk_size); in drm_buddy_init()
149 order = ilog2(size) - ilog2(chunk_size); in drm_buddy_init()
708 pages = size >> ilog2(mm->chunk_size); in drm_buddy_alloc_blocks()
710 min_order = ilog2(min_page_size) - ilog2(mm->chunk_size); in drm_buddy_alloc_blocks()
/linux-6.6.21/arch/mips/bcm63xx/
Dcs.c52 val |= (ilog2(size) - ilog2(8 * 1024)) << MPI_CSBASE_SIZE_SHIFT; in bcm63xx_set_cs_base()
/linux-6.6.21/block/
Ddisk-events.c25 [ilog2(DISK_EVENT_MEDIA_CHANGE)] = "media_change",
26 [ilog2(DISK_EVENT_EJECT_REQUEST)] = "eject_request",
30 [ilog2(DISK_EVENT_MEDIA_CHANGE)] = "DISK_MEDIA_CHANGE=1",
31 [ilog2(DISK_EVENT_EJECT_REQUEST)] = "DISK_EJECT_REQUEST=1",
/linux-6.6.21/drivers/iommu/
Dio-pgtable-dart.c42 (DART_GRANULE(d) >> ilog2(sizeof(dart_iopte)))
175 return (iova >> (3 * data->bits_per_level + ilog2(sizeof(dart_iopte)))) & in dart_get_table()
182 return (iova >> (2 * data->bits_per_level + ilog2(sizeof(dart_iopte)))) & in dart_get_l1_index()
189 return (iova >> (data->bits_per_level + ilog2(sizeof(dart_iopte)))) & in dart_get_l2_index()
373 bits_per_level = pg_shift - ilog2(sizeof(dart_iopte)); in dart_alloc_pgtable()
/linux-6.6.21/drivers/net/ethernet/marvell/octeontx2/af/
Drvu_cn10k.c362 cfg |= FIELD_PREP(LBK_LINK_CFG_RANGE_MASK, ilog2(chans)); in __rvu_lbk_set_chans()
456 cfg |= FIELD_PREP(NIX_AF_LINKX_RANGE_MASK, ilog2(cgx_chans)); in __rvu_nix_set_channels()
466 cfg |= FIELD_PREP(NIX_AF_LINKX_RANGE_MASK, ilog2(lbk_chans)); in __rvu_nix_set_channels()
476 cfg |= FIELD_PREP(NIX_AF_LINKX_RANGE_MASK, ilog2(sdp_chans)); in __rvu_nix_set_channels()
486 cfg |= FIELD_PREP(NIX_AF_LINKX_RANGE_MASK, ilog2(cpt_chans)); in __rvu_nix_set_channels()
514 cfg |= FIELD_PREP(RPMX_CMRX_LINK_RANGE_MASK, ilog2(16)); in __rvu_rpm_set_channels()
/linux-6.6.21/include/scsi/
Dscsi_cmnd.h230 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba()
237 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_logical_block_count()
387 xfer_len += (xfer_len >> ilog2(prot_interval)) * 8; in scsi_transfer_length()

12345678910>>...23