/tools/include/linux/ |
D | hash.h | 16 #define hash_long(val, bits) hash_32(val, bits) argument 18 #define hash_long(val, bits) hash_64(val, bits) argument 68 static inline u32 hash_32_generic(u32 val, unsigned int bits) in hash_32_generic() argument 71 return __hash_32(val) >> (32 - bits); in hash_32_generic() 77 static __always_inline u32 hash_64_generic(u64 val, unsigned int bits) in hash_64_generic() argument 81 return val * GOLDEN_RATIO_64 >> (64 - bits); in hash_64_generic() 84 return hash_32((u32)val ^ __hash_32(val >> 32), bits); in hash_64_generic() 88 static inline u32 hash_ptr(const void *ptr, unsigned int bits) in hash_ptr() argument 90 return hash_long((unsigned long)ptr, bits); in hash_ptr()
|
D | hashtable.h | 17 #define DEFINE_HASHTABLE(name, bits) \ argument 18 struct hlist_head name[1 << (bits)] = \ 19 { [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT } 21 #define DECLARE_HASHTABLE(name, bits) \ argument 22 struct hlist_head name[1 << (bits)] 28 #define hash_min(val, bits) \ argument 29 (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
|
D | bitmap.h | 10 #define DECLARE_BITMAP(name,bits) \ argument 11 unsigned long name[BITS_TO_LONGS(bits)] 13 int __bitmap_weight(const unsigned long *bitmap, int bits); 15 const unsigned long *bitmap2, int bits); 17 const unsigned long *bitmap2, unsigned int bits); 19 const unsigned long *bitmap2, unsigned int bits);
|
/tools/lib/ |
D | bitmap.c | 8 int __bitmap_weight(const unsigned long *bitmap, int bits) in __bitmap_weight() argument 10 int k, w = 0, lim = bits/BITS_PER_LONG; in __bitmap_weight() 15 if (bits % BITS_PER_LONG) in __bitmap_weight() 16 w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); in __bitmap_weight() 22 const unsigned long *bitmap2, int bits) in __bitmap_or() argument 25 int nr = BITS_TO_LONGS(bits); in __bitmap_or() 61 const unsigned long *bitmap2, unsigned int bits) in __bitmap_and() argument 64 unsigned int lim = bits/BITS_PER_LONG; in __bitmap_and() 69 if (bits % BITS_PER_LONG) in __bitmap_and() 71 BITMAP_LAST_WORD_MASK(bits)); in __bitmap_and() [all …]
|
/tools/perf/util/ |
D | pmu.y | 26 %type <bits> bit_term 27 %type <bits> bits 32 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS); 43 PP_CONFIG ':' bits 50 PP_CONFIG PP_VALUE ':' bits 57 bits: 58 bits ',' bit_term
|
D | perf_event_attr_fprintf.c | 15 static void __p_bits(char *buf, size_t size, u64 value, struct bit_names *bits) in __p_bits() argument 21 if (value & bits[i].bit) { in __p_bits() 22 buf += scnprintf(buf, size, "%s%s", first_bit ? "" : "|", bits[i].name); in __p_bits() 25 } while (bits[++i].name != NULL); in __p_bits() 31 struct bit_names bits[] = { in __p_sample_type() local 42 __p_bits(buf, size, value, bits); in __p_sample_type() 48 struct bit_names bits[] = { in __p_branch_sample_type() local 58 __p_bits(buf, size, value, bits); in __p_branch_sample_type() 64 struct bit_names bits[] = { in __p_read_format() local 70 __p_bits(buf, size, value, bits); in __p_read_format()
|
D | hashmap.h | 15 static inline size_t hash_bits(size_t h, int bits) in hash_bits() argument 18 if (bits == 0) in hash_bits() 23 return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits); in hash_bits() 25 return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits); in hash_bits()
|
D | pmu.c | 34 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS); 969 __u64 bits = 0; in perf_pmu__format_bits() local 975 for_each_set_bit(fbit, format->bits, PERF_PMU_FORMAT_BITS) in perf_pmu__format_bits() 976 bits |= 1ULL << fbit; in perf_pmu__format_bits() 978 return bits; in perf_pmu__format_bits() 1146 bitmap_weight(format->bits, PERF_PMU_FORMAT_BITS) > 1) { in pmu_config_term() 1175 max_val = pmu_format_max_value(format->bits); in pmu_config_term() 1195 pmu_format_value(format->bits, val, vp, zero); in pmu_config_term() 1346 int config, unsigned long *bits) in perf_pmu__new_format() argument 1356 memcpy(format->bits, bits, sizeof(format->bits)); in perf_pmu__new_format() [all …]
|
D | mmap.c | 34 len = bitmap_scnprintf(mask->bits, mask->nbits, buf, MASK_SIZE); in mmap_cpu_mask__scnprintf() 231 bitmap_free(map->affinity_mask.bits); in mmap__munmap() 254 set_bit(cpu, mask->bits); in build_node_mask() 261 map->affinity_mask.bits = bitmap_alloc(map->affinity_mask.nbits); in perf_mmap__setup_affinity_mask() 262 if (!map->affinity_mask.bits) in perf_mmap__setup_affinity_mask() 268 set_bit(map->core.cpu, map->affinity_mask.bits); in perf_mmap__setup_affinity_mask()
|
D | pmu.h | 95 int config, unsigned long *bits); 96 void perf_pmu__set_format(unsigned long *bits, long from, long to);
|
/tools/testing/selftests/kvm/lib/aarch64/ |
D | ucall.c | 28 unsigned int bits; in ucall_init() local 54 bits = vm->va_bits - 1; in ucall_init() 55 bits = vm->pa_bits < bits ? vm->pa_bits : bits; in ucall_init() 56 end = 1ul << bits; in ucall_init()
|
/tools/testing/selftests/arm64/fp/ |
D | README | 28 Vector length: 512 bits 31 Vector length: 512 bits 34 Vector length: 512 bits 37 Vector length: 512 bits 40 Vector length: 512 bits 43 Vector length: 512 bits 46 Vector length: 512 bits 49 Vector length: 512 bits 52 Vector length: 512 bits
|
/tools/power/cpupower/utils/helpers/ |
D | amd.c | 29 } bits; member 51 t = pstate.bits.did; in get_did() 67 fid = pstate.bits.fid; in get_cof() 124 else if (!pstate.bits.en) in decode_pstates()
|
/tools/gpio/ |
D | gpio-hammer.c | 47 values.bits = 0; in hammer_device() 63 fprintf(stdout, "%d", gpiotools_test_bit(values.bits, i)); in hammer_device() 74 gpiotools_change_bit(&values.bits, i); in hammer_device() 93 gpiotools_test_bit(values.bits, i)); in hammer_device()
|
D | gpio-event-mon.c | 60 values.bits = 0; in monitor_device() 74 gpiotools_test_bit(values.bits, 0)); in monitor_device() 81 gpiotools_test_bit(values.bits, 0)); in monitor_device() 84 gpiotools_test_bit(values.bits, i)); in monitor_device() 86 gpiotools_test_bit(values.bits, i)); in monitor_device()
|
/tools/spi/ |
D | spidev_fdx.c | 82 __u8 lsb, bits; in dumpstat() local 93 if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) { in dumpstat() 103 name, mode, bits, lsb ? "(lsb first) " : "", speed); in dumpstat()
|
D | spidev_test.c | 40 static uint8_t bits = 8; variable 128 .bits_per_word = bits, in transfer() 245 bits = atoi(optarg); in parse_opts() 444 ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits); in main() 448 ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits); in main() 464 printf("bits per word: %u\n", bits); in main()
|
/tools/lib/bpf/ |
D | hashmap.h | 15 static inline size_t hash_bits(size_t h, int bits) in hash_bits() argument 18 if (bits == 0) in hash_bits() 23 return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits); in hash_bits() 25 return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits); in hash_bits()
|
/tools/testing/selftests/seccomp/ |
D | seccomp_benchmark.c | 141 long ret, bits; in main() local 217 bits = compare("native", "≤", "1 filter", native, le, filter1); in main() 218 if (bits) in main() 224 bits = compare("1 bitmapped", "≈", "2 bitmapped", in main() 226 if (bits) { in main()
|
/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/ |
D | types.h | 16 #define DECLARE_BITMAP(name, bits) \ argument 17 unsigned long name[BITS_TO_LONGS(bits)]
|
/tools/testing/selftests/vm/ |
D | virtual_address_range.c | 60 int bits = HIGH_ADDR_SHIFT + rand() % (63 - HIGH_ADDR_SHIFT); in hind_addr() local 62 return (char *) (1UL << bits); in hind_addr()
|
/tools/testing/selftests/vDSO/ |
D | parse_vdso.c | 35 #define ELF_BITS_XFORM2(bits, x) Elf##bits##_##x argument 36 #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x) argument
|
/tools/perf/arch/x86/util/ |
D | intel-pt.c | 101 static u64 intel_pt_masked_bits(u64 mask, u64 bits) in intel_pt_masked_bits() argument 110 if (bits & top_bit) in intel_pt_masked_bits() 114 bits <<= 1; in intel_pt_masked_bits() 172 static int intel_pt_pick_bit(int bits, int target) in intel_pt_pick_bit() argument 176 for (pos = 0; bits; bits >>= 1, pos++) { in intel_pt_pick_bit() 177 if (bits & 1) { in intel_pt_pick_bit() 494 u64 bits; in intel_pt_val_config_term() local 506 bits = perf_pmu__format_bits(&intel_pt_pmu->format, name); in intel_pt_val_config_term() 508 config &= bits; in intel_pt_val_config_term() 510 for (shift = 0; bits && !(bits & 1); shift++) in intel_pt_val_config_term() [all …]
|
/tools/testing/selftests/bpf/ |
D | test_btf.h | 15 #define BTF_TYPE_INT_ENC(name, encoding, bits_offset, bits, sz) \ argument 17 BTF_INT_ENC(encoding, bits_offset, bits)
|
/tools/firewire/ |
D | nosy-dump.c | 708 uint32_t bits; in decode_link_packet() local 710 bits = get_bits(packet, offset, f->width); in decode_link_packet() 711 printf("%s", f->value_names[bits]); in decode_link_packet() 717 unsigned long long bits; in decode_link_packet() local 725 bits = get_bits(packet, offset, high_width); in decode_link_packet() 726 bits = (bits << low_width) | in decode_link_packet() 729 bits = get_bits(packet, offset, f->width); in decode_link_packet() 732 printf("%s=0x%0*llx", f->name, (f->width + 3) / 4, bits); in decode_link_packet() 735 data_length = bits; in decode_link_packet()
|