Home
last modified time | relevance | path

Searched refs:BITS_PER_TYPE (Results 1 – 25 of 72) sorted by relevance

123

/openbmc/linux/tools/include/linux/
H A Dbitops.h17 #define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) macro
18 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(long))
19 #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u64))
20 #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u32))
21 #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(char))
/openbmc/linux/lib/dim/
H A Ddim.c62 u32 npkts = BIT_GAP(BITS_PER_TYPE(u32), end->pkt_ctr, start->pkt_ctr); in dim_calc_stats()
63 u32 nbytes = BIT_GAP(BITS_PER_TYPE(u32), end->byte_ctr, in dim_calc_stats()
65 u32 ncomps = BIT_GAP(BITS_PER_TYPE(u32), end->comp_ctr, in dim_calc_stats()
H A Dnet_dim.c225 nevents = BIT_GAP(BITS_PER_TYPE(u16), in net_dim()
/openbmc/linux/include/linux/
H A Dbitops.h18 #define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) macro
19 #define BITS_TO_LONGS(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(long))
20 #define BITS_TO_U64(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u64))
21 #define BITS_TO_U32(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u32))
22 #define BITS_TO_BYTES(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(char))
/openbmc/linux/security/landlock/
H A Druleset.h24 static_assert(BITS_PER_TYPE(access_mask_t) >= LANDLOCK_NUM_ACCESS_FS);
30 static_assert(BITS_PER_TYPE(layer_mask_t) >= LANDLOCK_MAX_NUM_LAYERS);
/openbmc/linux/drivers/mux/
H A Dgpio.c26 DECLARE_BITMAP(values, BITS_PER_TYPE(state)); in mux_gpio_set()
29 bitmap_from_arr32(values, &value, BITS_PER_TYPE(value)); in mux_gpio_set()
/openbmc/linux/arch/riscv/kvm/
H A Daia_imsic.c20 #define IMSIC_MAX_EIX (IMSIC_MAX_ID / BITS_PER_TYPE(u64))
23 unsigned long eip[BITS_PER_TYPE(u64) / BITS_PER_LONG];
24 unsigned long eie[BITS_PER_TYPE(u64) / BITS_PER_LONG];
251 unsigned long eipend[BITS_PER_TYPE(u64) / BITS_PER_LONG]; in imsic_mrif_topei()
270 imin = ei * BITS_PER_TYPE(u64); in imsic_mrif_topei()
271 imax = ((imin + BITS_PER_TYPE(u64)) < max_msi) ? in imsic_mrif_topei()
272 imin + BITS_PER_TYPE(u64) : max_msi; in imsic_mrif_topei()
862 BITS_PER_TYPE(u64)]; in kvm_riscv_vcpu_aia_imsic_rmw()
863 clear_bit(topei & (BITS_PER_TYPE(u64) - 1), in kvm_riscv_vcpu_aia_imsic_rmw()
979 eix = &imsic->swfile->eix[iid / BITS_PER_TYPE(u64)]; in kvm_riscv_vcpu_aia_imsic_inject()
[all …]
/openbmc/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_mbx.c124 DECLARE_BITMAP(csr, BITS_PER_TYPE(u64)); in nitrox_pf2vf_mbox_handler()
135 for_each_set_bit(i, csr, BITS_PER_TYPE(csr)) { in nitrox_pf2vf_mbox_handler()
158 for_each_set_bit(i, csr, BITS_PER_TYPE(csr)) { in nitrox_pf2vf_mbox_handler()
/openbmc/linux/kernel/irq/
H A Dipi-mux.c140 for_each_set_bit(hwirq, &ipis, BITS_PER_TYPE(int)) in ipi_mux_process()
163 if (BITS_PER_TYPE(int) < nr_ipi || !mux_send) in ipi_mux_create()
/openbmc/linux/drivers/char/hw_random/
H A Dcctrng.h18 #define CC_TRNG_EHR_IN_BITS (CC_TRNG_EHR_IN_WORDS * BITS_PER_TYPE(u32))
/openbmc/linux/drivers/vfio/
H A Diova_bitmap.c132 return iova / (BITS_PER_TYPE(*bitmap->bitmap) * pgsize); in iova_bitmap_offset_to_index()
143 return (index * BITS_PER_TYPE(*bitmap->bitmap)) << pgshift; in iova_bitmap_index_to_offset()
/openbmc/linux/drivers/mtd/nand/raw/
H A Dams-delta.c60 DECLARE_BITMAP(values, BITS_PER_TYPE(byte)) = { byte, }; in gpio_nand_io_write()
71 DECLARE_BITMAP(values, BITS_PER_TYPE(byte)) = { byte, }; in gpio_nand_dir_output()
87 DECLARE_BITMAP(values, BITS_PER_TYPE(res)) = { 0, }; in gpio_nand_io_read()
/openbmc/linux/drivers/net/mdio/
H A Dmdio-mux-gpio.c26 DECLARE_BITMAP(values, BITS_PER_TYPE(desired_child)); in mdio_mux_gpio_switch_fn()
/openbmc/linux/drivers/gpu/drm/
H A Ddrm_print.c249 if (WARN_ON_ONCE(nbits > BITS_PER_TYPE(value))) in drm_print_bits()
250 nbits = BITS_PER_TYPE(value); in drm_print_bits()
/openbmc/linux/drivers/gpu/drm/i915/
H A Di915_mitigations.c37 BUILD_BUG_ON(ARRAY_SIZE(names) >= BITS_PER_TYPE(mitigations)); in mitigations_set()
H A Dintel_runtime_pm.h93 BITS_PER_TYPE(typeof_member(struct intel_runtime_pm, wakeref_count))
/openbmc/linux/drivers/pinctrl/sunxi/
H A Dpinctrl-sunxi.c68 offset / BITS_PER_TYPE(u32) * sizeof(u32); in sunxi_mux_reg()
69 *shift = offset % BITS_PER_TYPE(u32); in sunxi_mux_reg()
80 offset / BITS_PER_TYPE(u32) * sizeof(u32); in sunxi_data_reg()
81 *shift = offset % BITS_PER_TYPE(u32); in sunxi_data_reg()
92 offset / BITS_PER_TYPE(u32) * sizeof(u32); in sunxi_dlevel_reg()
93 *shift = offset % BITS_PER_TYPE(u32); in sunxi_dlevel_reg()
104 offset / BITS_PER_TYPE(u32) * sizeof(u32); in sunxi_pull_reg()
105 *shift = offset % BITS_PER_TYPE(u32); in sunxi_pull_reg()
/openbmc/linux/drivers/hid/amd-sfh-hid/sfh1_1/
H A Damd_sfh_desc.c153 if (exp >= BITS_PER_TYPE(u32)) in float_to_int()
160 if (abs(shift) >= BITS_PER_TYPE(u32)) in float_to_int()
/openbmc/linux/drivers/gpu/drm/i915/gt/
H A Dselftest_ring.c16 ring->wrap = BITS_PER_TYPE(ring->size) - ilog2(sz); in mock_ring()
H A Dintel_sseu.h66 #define XEHP_BITMAP_BITS(mask) ((int)BITS_PER_TYPE(typeof(mask.xehp)))
/openbmc/linux/net/netfilter/
H A Dnft_bitwise.c46 carry = src[i - 1] >> (BITS_PER_TYPE(u32) - shift); in nft_bitwise_eval_lshift()
59 carry = src[i] << (BITS_PER_TYPE(u32) - shift); in nft_bitwise_eval_rshift()
152 if (priv->data.data[0] >= BITS_PER_TYPE(u32)) { in nft_bitwise_init_shift()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Dhwmon.c209 DECLARE_BITMAP(smap, BITS_PER_TYPE(sensor_map)); in mlx5_hwmon_init_sensors_indexes()
216 for_each_set_bit(bit_pos, smap, BITS_PER_TYPE(sensor_map)) { in mlx5_hwmon_init_sensors_indexes()
/openbmc/linux/drivers/iio/amplifiers/
H A Dhmc425a.c47 DECLARE_BITMAP(values, BITS_PER_TYPE(value)); in hmc425a_write()
/openbmc/linux/drivers/power/supply/
H A Ducs1002_power.c159 static const int bit_weights_uAh[BITS_PER_TYPE(u32)] = { in ucs1002_get_charge()
208 static const int bit_weights_uA[BITS_PER_TYPE(u8)] = { in ucs1002_get_current()
/openbmc/linux/drivers/net/can/usb/etas_es58x/
H A Des58x_fd.c72 const u32 mask = GENMASK(BITS_PER_TYPE(mask) - 1, in es58x_fd_echo_msg()
73 BITS_PER_TYPE(echo_msg->packet_idx)); in es58x_fd_echo_msg()

123