| /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 65 static inline u32 hash_32(u32 val, unsigned int bits) in hash_32() argument 68 return __hash_32(val) >> (32 - bits); in hash_32() 74 static __always_inline u32 hash_64_generic(u64 val, unsigned int bits) in hash_64_generic() argument 78 return val * GOLDEN_RATIO_64 >> (64 - bits); in hash_64_generic() 81 return hash_32((u32)val ^ __hash_32(val >> 32), bits); in hash_64_generic() 85 static inline u32 hash_ptr(const void *ptr, unsigned int bits) in hash_ptr() argument 87 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 | 12 #define DECLARE_BITMAP(name,bits) \ argument 13 unsigned long name[BITS_TO_LONGS(bits)] 15 unsigned int __bitmap_weight(const unsigned long *bitmap, int bits); 17 const unsigned long *bitmap2, int bits); 19 const unsigned long *bitmap2, unsigned int bits); 21 const unsigned long *bitmap2, unsigned int bits); 24 const unsigned long *bitmap2, unsigned int bits);
|
| /tools/lib/ |
| D | bitmap.c | 8 unsigned int __bitmap_weight(const unsigned long *bitmap, int bits) in __bitmap_weight() argument 10 unsigned 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 …]
|
| D | list_sort.c | 204 size_t bits; in list_sort() local 208 for (bits = count; bits & 1; bits >>= 1) in list_sort() 211 if (likely(bits)) { in list_sort()
|
| /tools/perf/util/ |
| D | pmu.y | 29 static void perf_pmu__set_format(unsigned long *bits, long from, long to) in perf_pmu__set_format() argument 36 memset(bits, 0, BITS_TO_BYTES(PERF_PMU_FORMAT_BITS)); in perf_pmu__set_format() 38 __set_bit(b, bits); in perf_pmu__set_format() 46 %type <bits> bit_term 47 %type <bits> bits 52 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS); 63 PP_CONFIG ':' bits 68 PP_CONFIG PP_VALUE ':' bits 73 bits: 74 bits ',' bit_term
|
| D | sharded_mutex.c | 10 unsigned int bits; in sharded_mutex__new() local 12 for (bits = 0; ((size_t)1 << bits) < num_shards; bits++) in sharded_mutex__new() 15 size = sizeof(*result) + sizeof(struct mutex) * (1 << bits); in sharded_mutex__new() 20 result->cap_bits = bits; in sharded_mutex__new() 21 for (size_t i = 0; i < ((size_t)1 << bits); i++) in sharded_mutex__new()
|
| 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() 257 __set_bit(cpu.cpu, mask->bits); in build_node_mask() 264 map->affinity_mask.bits = bitmap_zalloc(map->affinity_mask.nbits); in perf_mmap__setup_affinity_mask() 265 if (!map->affinity_mask.bits) in perf_mmap__setup_affinity_mask() 271 __set_bit(map->core.cpu.cpu, map->affinity_mask.bits); in perf_mmap__setup_affinity_mask() 363 clone->bits = bitmap_zalloc(original->nbits); in mmap_cpu_mask__duplicate() 364 if (!clone->bits) in mmap_cpu_mask__duplicate() 367 memcpy(clone->bits, original->bits, MMAP_CPU_MASK_BYTES(original)); in mmap_cpu_mask__duplicate()
|
| D | perf_event_attr_fprintf.c | 19 static void __p_bits(char *buf, size_t size, u64 value, struct bit_names *bits) in __p_bits() argument 25 if (value & bits[i].bit) { in __p_bits() 26 buf += scnprintf(buf, size, "%s%s", first_bit ? "" : "|", bits[i].name); in __p_bits() 29 } while (bits[++i].name != NULL); in __p_bits() 35 struct bit_names bits[] = { in __p_sample_type() local 47 __p_bits(buf, size, value, bits); in __p_sample_type() 53 struct bit_names bits[] = { in __p_branch_sample_type() local 64 __p_bits(buf, size, value, bits); in __p_branch_sample_type() 70 struct bit_names bits[] = { in __p_read_format() local 76 __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()
|
| /tools/testing/selftests/bpf/progs/ |
| D | verifier_bits_iter.c | 69 bpf_for_each(bits, bit, NULL, 1) in null_pointer() 83 bpf_for_each(bits, bit, &data, 1) in bits_copy() 98 bpf_for_each(bits, bit, &data[0], ARRAY_SIZE(data)) in bits_memalloc() 112 bpf_for_each(bits, bit, &data, 1) { in bit_index() 130 bpf_for_each(bits, bit, &data[0], 512) /* Be greater than 511 */ in bits_too_big() 144 bpf_for_each(bits, bit, &data[0], 1) in fewer_words() 158 bpf_for_each(bits, bit, &data[0], 0) in zero_words() 172 bpf_for_each(bits, bit, &data[0], 67108865) in huge_words() 188 bpf_for_each(bits, bit, bits_array, 511) { in max_words() 215 bpf_for_each(bits, bit, bad_addr, 1) in bad_words() [all …]
|
| /tools/testing/selftests/dma/ |
| D | dma_map_benchmark.c | 31 int bits = 32, xdelay = 0, dir = DMA_MAP_BIDIRECTIONAL; in main() local 49 bits = atoi(optarg); in main() 84 if (bits < 20 || bits > 64) { in main() 110 map.dma_bits = bits; in main()
|
| /tools/testing/selftests/powerpc/dexcr/ |
| D | lsdexcr.c | 24 static void print_dexcr(char *name, unsigned int bits) in print_dexcr() argument 29 printf("%s: 0x%08x", name, bits); in print_dexcr() 31 if (bits == 0) { in print_dexcr() 39 if (bits & mask) { in print_dexcr() 41 bits &= ~mask; in print_dexcr() 45 if (bits) in print_dexcr()
|
| /tools/testing/selftests/lkdtm/ |
| D | stack-entropy.sh | 41 bits=$(echo "obase=2; $seen" | bc | wc -L) 42 echo "Bits of stack entropy: $bits" 46 if [ "$bits" -lt 5 ]; then
|
| /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/x86/turbostat/ |
| D | Makefile | 43 @echo "#define BIT(x) (1 << (x))" > $(SNAPSHOT)/bits.h 44 @echo "#define BIT_ULL(nr) (1ULL << (nr))" >> $(SNAPSHOT)/bits.h 45 …ine GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))" >> $(SNAPSHOT)/bits.h 46 …_ULL(h, l) (((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))" >> $(SNAPSHOT)/bits.h
|
| /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/testing/selftests/resctrl/ |
| D | resctrl.h | 54 int bits; member 188 unsigned int bits = count_bits(full_cache_mask); in cache_portion_size() local 194 if (!bits) in cache_portion_size() 197 return cache_size * count_bits(portion_mask) / bits; in cache_portion_size()
|
| D | cat_test.c | 91 int bits; in check_results() local 111 bits = count_bits(current_mask); in check_results() 113 ret = show_results_info(sum_llc_perf_miss, bits, in check_results() 115 MIN_DIFF_PERCENT_PER_BIT * (bits - 1), in check_results() 239 int n = uparams->bits; in cat_run_test()
|
| /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() 257 bits = atoi(optarg); in parse_opts() 476 ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits); in main() 480 ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits); in main() 496 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 | 185 long ret, bits; in main() local 279 bits = compare("native", "≤", "1 filter", native, le, filter1, in main() 281 if (bits) in main() 287 bits = compare("1 bitmapped", "≈", "2 bitmapped", in main() 289 if (bits) { in main()
|
| /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
|