Home
last modified time | relevance | path

Searched refs:is_power_of_2 (Results 1 – 25 of 336) sorted by relevance

12345678910>>...14

/linux-6.15/include/linux/
H A Drandom.h79 if (likely(is_power_of_2(ceil) || (u8)mult >= (1U << 8) % ceil)) in get_random_u32_below()
83 if (likely(is_power_of_2(ceil) || (u16)mult >= (1U << 16) % ceil)) in get_random_u32_below()
87 if (likely(is_power_of_2(ceil) || (u32)mult >= -ceil % ceil)) in get_random_u32_below()
H A Dlog2.h45 bool is_power_of_2(unsigned long n) in is_power_of_2() function
230 if (is_power_of_2(n)) in __bits_per()
H A Diommu-helper.h23 BUG_ON(!is_power_of_2(boundary_size)); in iommu_is_span_boundary()
H A Dpage_frag_cache.h49 WARN_ON_ONCE(!is_power_of_2(align)); in page_frag_alloc_align()
H A Dgeneric-radix-tree.h165 if (!is_power_of_2(obj_size)) { in __idx_to_offset()
323 if (!is_power_of_2(obj_size) && in __genradix_iter_advance()
/linux-6.15/tools/testing/selftests/riscv/hwprobe/
H A Dcbo.c83 static bool is_power_of_2(__u64 n) in is_power_of_2() function
100 is_power_of_2(block_size), "Zicbom block size\n"); in test_zicbom()
125 is_power_of_2(block_size), "Zicboz block size\n"); in test_zicboz()
132 if (illegal_insn || !is_power_of_2(block_size)) { in test_zicboz()
/linux-6.15/fs/verity/
H A Dhash_algs.c244 BUG_ON(!is_power_of_2(alg->digest_size)); in fsverity_check_hash_algs()
245 BUG_ON(!is_power_of_2(alg->block_size)); in fsverity_check_hash_algs()
/linux-6.15/fs/xfs/
H A Dxfs_linux.h207 return is_power_of_2(b) ? ilog2(b) : -1; in log2_if_power2()
213 return is_power_of_2(b) ? b - 1 : 0; in mask64_if_power2()
/linux-6.15/include/crypto/
H A Dctr.h31 if (WARN_ON_ONCE(!is_power_of_2(blocksize))) in crypto_ctr_encrypt_walk()
/linux-6.15/arch/x86/kvm/
H A Dkvm_cache_regs.h180 BUILD_BUG_ON(!is_power_of_2(cr0_bit)); in kvm_is_cr0_bit_set()
202 BUILD_BUG_ON(!is_power_of_2(cr4_bit)); in kvm_is_cr4_bit_set()
/linux-6.15/scripts/dtc/
H A Ddtc.c26 static int is_power_of_2(int x) in is_power_of_2() function
212 if (!is_power_of_2(alignsize)) in main()
/linux-6.15/mm/
H A Dhugetlb_vmemmap.h49 if (!is_power_of_2(sizeof(struct page))) in hugetlb_vmemmap_optimizable_size()
/linux-6.15/tools/include/linux/
H A Dlog2.h38 bool is_power_of_2(unsigned long n) in is_power_of_2() function
/linux-6.15/tools/perf/util/bpf_skel/
H A Daugmented_raw_syscalls.bpf.c26 #define is_power_of_2(n) (n != 0 && ((n & (n - 1)) == 0)) macro
178 …_Static_assert(is_power_of_2(sizeof(augmented_arg->value)), "sizeof(augmented_arg->value) needs to… in augmented_arg__read_str()
216 …_Static_assert(is_power_of_2(sizeof(augmented_args->arg.saddr)), "sizeof(augmented_args->arg.saddr… in sys_enter_connect()
/linux-6.15/drivers/gpu/drm/i915/
H A Di915_ioctl.c57 GEM_BUG_ON(!is_power_of_2(entry->size)); in i915_reg_read_ioctl()
/linux-6.15/drivers/scsi/bnx2i/
H A Dbnx2i_sysfs.c77 (is_power_of_2(val))) in bnx2i_set_sq_info()
/linux-6.15/arch/x86/include/asm/
H A Ddiv64.h26 if (__builtin_constant_p(__base) && is_power_of_2(__base)) { \
/linux-6.15/sound/mips/
H A Dsnd-n64.c170 if (is_power_of_2(c->min)) { in hw_rule_period_size()
174 if (is_power_of_2(c->max)) { in hw_rule_period_size()
/linux-6.15/arch/arm/mm/
H A Dcache-uniphier.c350 !is_power_of_2(data->line_size)) { in __uniphier_cache_init()
358 !is_power_of_2(data->nsets)) { in __uniphier_cache_init()
/linux-6.15/drivers/dma/qcom/
H A Dhidma_mgmt.c67 if (!is_power_of_2(mgmtdev->max_write_request) || in hidma_mgmt_setup()
75 if (!is_power_of_2(mgmtdev->max_read_request) || in hidma_mgmt_setup()
/linux-6.15/drivers/input/keyboard/
H A Dcap11xx.c212 } else if (is_power_of_2(u32_val) && u32_val <= 8) { in cap11xx_init_keys()
242 if (!is_power_of_2(u32_val) || u32_val > 128) { in cap11xx_init_keys()
281 if (!is_power_of_2(priv->calib_sensitivities[i]) || in cap11xx_init_keys()
/linux-6.15/drivers/infiniband/hw/vmw_pvrdma/
H A Dpvrdma_doorbell.c58 if (!is_power_of_2(num)) in pvrdma_uar_table_init()
/linux-6.15/drivers/gpu/drm/i915/gt/
H A Dintel_ring.h137 GEM_BUG_ON(!is_power_of_2(size)); in __intel_ring_space()
/linux-6.15/drivers/media/rc/img-ir/
H A Dimg-ir-sony.c75 if (!is_power_of_2(protocols)) { in img_ir_sony_filter()
/linux-6.15/arch/powerpc/mm/
H A Dinit-common.c134 BUG_ON(!is_power_of_2(minalign)); in pgtable_cache_add()

12345678910>>...14