Home
last modified time | relevance | path

Searched refs:nr (Results 1 – 25 of 163) sorted by relevance

1234567

/tools/include/asm-generic/bitops/
Dnon-atomic.h16 static inline void __set_bit(int nr, volatile unsigned long *addr) in __set_bit() argument
18 unsigned long mask = BIT_MASK(nr); in __set_bit()
19 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __set_bit()
24 static inline void __clear_bit(int nr, volatile unsigned long *addr) in __clear_bit() argument
26 unsigned long mask = BIT_MASK(nr); in __clear_bit()
27 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __clear_bit()
41 static inline void __change_bit(int nr, volatile unsigned long *addr) in __change_bit() argument
43 unsigned long mask = BIT_MASK(nr); in __change_bit()
44 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __change_bit()
58 static inline int __test_and_set_bit(int nr, volatile unsigned long *addr) in __test_and_set_bit() argument
[all …]
Datomic.h8 static inline void set_bit(int nr, unsigned long *addr) in set_bit() argument
10 addr[nr / __BITS_PER_LONG] |= 1UL << (nr % __BITS_PER_LONG); in set_bit()
13 static inline void clear_bit(int nr, unsigned long *addr) in clear_bit() argument
15 addr[nr / __BITS_PER_LONG] &= ~(1UL << (nr % __BITS_PER_LONG)); in clear_bit()
/tools/testing/selftests/gpio/
Dgpio-mockup-sysfs.sh7 active_low_sysfs=`cat $GPIO_SYSFS/gpio$nr/active_low`
8 val_sysfs=`cat $GPIO_SYSFS/gpio$nr/value`
9 dir_sysfs=`cat $GPIO_SYSFS/gpio$nr/direction`
11 gpio_this_debugfs=`cat $GPIO_DEBUGFS |grep "gpio-$nr" | sed "s/(.*)//g"`
38 nr=$1
43 echo $direction > $GPIO_SYSFS/gpio$nr/direction
44 echo $active_low > $GPIO_SYSFS/gpio$nr/active_low
46 echo $value > $GPIO_SYSFS/gpio$nr/value
48 is_consistent $nr
53 nr=$1
[all …]
/tools/perf/trace/beauty/
Dioctl.c21 static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_tty_cmd() argument
41 if (nr < strarray__ioctl_tty_cmd.nr_entries && strarray__ioctl_tty_cmd.entries[nr] != NULL) in ioctl__scnprintf_tty_cmd()
42 return scnprintf(bf, size, "%s", strarray__ioctl_tty_cmd.entries[nr]); in ioctl__scnprintf_tty_cmd()
44 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'T', nr, dir); in ioctl__scnprintf_tty_cmd()
47 static size_t ioctl__scnprintf_drm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_drm_cmd() argument
52 if (nr < strarray__drm_ioctl_cmds.nr_entries && strarray__drm_ioctl_cmds.entries[nr] != NULL) in ioctl__scnprintf_drm_cmd()
53 return scnprintf(bf, size, "DRM_%s", strarray__drm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_drm_cmd()
55 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'd', nr, dir); in ioctl__scnprintf_drm_cmd()
58 static size_t ioctl__scnprintf_sndrv_pcm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_pcm_cmd() argument
63 …if (nr < strarray__sndrv_pcm_ioctl_cmds.nr_entries && strarray__sndrv_pcm_ioctl_cmds.entries[nr] !… in ioctl__scnprintf_sndrv_pcm_cmd()
[all …]
/tools/include/linux/
Dbits.h9 #define BIT_ULL(nr) (ULL(1) << (nr)) argument
10 #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG)) argument
11 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) argument
12 #define BIT_ULL_MASK(nr) (ULL(1) << ((nr) % BITS_PER_LONG_LONG)) argument
13 #define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG) argument
Dbitops.h18 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(long)) argument
19 #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u64)) argument
20 #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u32)) argument
21 #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(char)) argument
/tools/lib/api/fd/
Darray.c17 fda->nr = fda->nr_alloc = 0; in fdarray__init()
21 int fdarray__grow(struct fdarray *fda, int nr) in fdarray__grow() argument
24 int nr_alloc = fda->nr_alloc + nr; in fdarray__grow()
38 memset(&entries[fda->nr_alloc], 0, sizeof(struct pollfd) * nr); in fdarray__grow()
39 memset(&priv[fda->nr_alloc], 0, sizeof(fda->priv[0]) * nr); in fdarray__grow()
78 int pos = fda->nr; in fdarray__add()
80 if (fda->nr == fda->nr_alloc && in fdarray__add()
84 fda->entries[fda->nr].fd = fd; in fdarray__add()
85 fda->entries[fda->nr].events = revents; in fdarray__add()
86 fda->priv[fda->nr].flags = flags; in fdarray__add()
[all …]
/tools/perf/arch/x86/entry/syscalls/
Dsyscalltbl.sh8 nr="$1"
11 echo " [$nr] = \"$name\","
15 nr="$1"
18 syscall_macro "$nr" "$entry"
27 while read nr abi name entry compat; do
28 if [ $nr -ge 512 ] ; then # discard compat sycalls
32 emit "$nr" "$name"
33 max_nr=$nr
/tools/perf/arch/powerpc/entry/syscalls/
Dmksyscalltbl22 local max_nr nr abi sc discard
24 nr=0
27 while read nr abi sc discard; do
28 if [ "$max_nr" -lt "$nr" ]; then
29 printf '\t[%d] = "%s",\n' $nr $sc
30 max_nr=$nr
/tools/lib/perf/
Dthreadmap.c10 static void perf_thread_map__reset(struct perf_thread_map *map, int start, int nr) in perf_thread_map__reset() argument
12 size_t size = (nr - start) * sizeof(map->map[0]); in perf_thread_map__reset()
18 struct perf_thread_map *perf_thread_map__realloc(struct perf_thread_map *map, int nr) in perf_thread_map__realloc() argument
20 size_t size = sizeof(*map) + sizeof(map->map[0]) * nr; in perf_thread_map__realloc()
21 int start = map ? map->nr : 0; in perf_thread_map__realloc()
28 perf_thread_map__reset(map, start, nr); in perf_thread_map__realloc()
51 threads->nr = 1; in perf_thread_map__new_dummy()
64 for (i = 0; i < threads->nr; i++) in perf_thread_map__delete()
85 return threads ? threads->nr : 1; in perf_thread_map__nr()
Dcpumap.c18 cpus->nr = 1; in perf_cpu_map__dummy_new()
64 cpus->nr = nr_cpus; in cpu_map__default_new()
91 cpus->nr = j; in cpu_map__trim_new()
250 if (cpus && idx < cpus->nr) in perf_cpu_map__cpu()
258 return cpus ? cpus->nr : 1; in perf_cpu_map__nr()
270 for (i = 0; i < cpus->nr; ++i) { in perf_cpu_map__idx()
282 for (i = 0; i < map->nr; i++) { in perf_cpu_map__max()
314 if (orig->nr == other->nr && in perf_cpu_map__merge()
315 !memcmp(orig->map, other->map, orig->nr * sizeof(int))) in perf_cpu_map__merge()
318 tmp_len = orig->nr + other->nr; in perf_cpu_map__merge()
[all …]
/tools/perf/util/
Dcpumap.c25 map = perf_cpu_map__empty_new(cpus->nr); in cpu_map__from_entries()
29 for (i = 0; i < cpus->nr; i++) { in cpu_map__from_entries()
48 int nr, nbits = mask->nr * mask->long_size * BITS_PER_BYTE; in cpu_map__from_mask() local
50 nr = bitmap_weight(mask->mask, nbits); in cpu_map__from_mask()
52 map = perf_cpu_map__empty_new(nr); in cpu_map__from_mask()
81 struct perf_cpu_map *perf_cpu_map__empty_new(int nr) in perf_cpu_map__empty_new() argument
83 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int) * nr); in perf_cpu_map__empty_new()
88 cpus->nr = nr; in perf_cpu_map__empty_new()
89 for (i = 0; i < nr; i++) in perf_cpu_map__empty_new()
118 if (idx > map->nr) in cpu_map__get_socket()
[all …]
Dthread_map.c50 threads->nr = items; in thread_map__new_by_pid()
67 threads->nr = 1; in thread_map__new_by_tid()
89 threads->nr = 0; in __thread_map__new_all_cpus()
114 while (threads->nr + items >= max_threads) { in __thread_map__new_all_cpus()
130 perf_thread_map__set_pid(threads, threads->nr + i, in __thread_map__new_all_cpus()
138 threads->nr += items; in __thread_map__new_all_cpus()
223 threads->nr = total_tasks; in thread_map__new_by_pid_str()
279 threads->nr = ntasks; in thread_map__new_by_tid_str()
311 threads->nr, threads->nr > 1 ? "s" : ""); in thread_map__fprintf()
312 for (i = 0; i < threads->nr; ++i) in thread_map__fprintf()
[all …]
Dcputopo.c178 u32 nr, i, nr_addr; in cpu_topology__new() local
194 nr = (u32)(ncpus & UINT_MAX); in cpu_topology__new()
196 sz = nr * sizeof(char *); in cpu_topology__new()
215 for (i = 0; i < nr; i++) { in cpu_topology__new()
233 static int load_numa_node(struct numa_topology_node *node, int nr) in load_numa_node() argument
243 node->node = (u32) nr; in load_numa_node()
246 sysfs__mountpoint(), nr); in load_numa_node()
269 sysfs__mountpoint(), nr); in load_numa_node()
300 u32 nr, i; in numa_topology__new() local
322 nr = (u32) node_map->nr; in numa_topology__new()
[all …]
Ddata.c21 static void close_dir(struct perf_data_file *files, int nr) in close_dir() argument
23 while (--nr >= 0) { in close_dir()
24 close(files[nr].fd); in close_dir()
25 zfree(&files[nr].path); in close_dir()
32 close_dir(data->dir.files, data->dir.nr); in perf_data__close_dir()
35 int perf_data__create_dir(struct perf_data *data, int nr) in perf_data__create_dir() argument
43 files = zalloc(nr * sizeof(*files)); in perf_data__create_dir()
47 for (i = 0; i < nr; i++) { in perf_data__create_dir()
63 data->dir.nr = nr; in perf_data__create_dir()
77 int nr = 0; in perf_data__open_dir() local
[all …]
Dthread-stack.c347 ts->br_stack_rb->nr = 0; in __thread_stack__flush()
402 if (bs->nr < ts->br_stack_sz) in thread_stack__update_br_stack()
403 bs->nr += 1; in thread_stack__update_br_stack()
530 chain->nr = 0; in thread_stack__sample()
538 chain->nr = 2; in thread_stack__sample()
556 chain->nr = i; in thread_stack__sample()
570 size_t nr = 0, j; in thread_stack__sample_late() local
573 chain->nr = 0; in thread_stack__sample_late()
595 for (; nr < sz && j <= ts->cnt; nr++, j++) { in thread_stack__sample_late()
599 if (nr >= sz - 1) in thread_stack__sample_late()
[all …]
Dstrbuf.c49 size_t nr = sb->len + extra + 1; in strbuf_grow() local
51 if (nr < sb->alloc) in strbuf_grow()
54 if (nr <= sb->len) in strbuf_grow()
57 if (alloc_nr(sb->alloc) > nr) in strbuf_grow()
58 nr = alloc_nr(sb->alloc); in strbuf_grow()
64 buf = realloc(sb->alloc ? sb->buf : NULL, nr * sizeof(*buf)); in strbuf_grow()
69 sb->alloc = nr; in strbuf_grow()
/tools/perf/arch/s390/entry/syscalls/
Dmksyscalltbl19 local max_nr nr abi sc discard
22 while read nr abi sc discard; do
23 printf '\t[%d] = "%s",\n' $nr $sc
24 max_nr=$nr
/tools/testing/selftests/x86/
Dmov_ss_trap.c146 unsigned long nr; in main() local
159 asm volatile ("mov %[ss], %[tmp]" : [tmp] "=r" (nr) : [ss] "m" (ss)); in main()
180 nr = -1; in main()
182 : [tmp] "+r" (nr) : [ss] "m" (ss)); in main()
204 : [tmp] "=r" (nr) : [ss] "m" (ss)); in main()
226 nr = SYS_getpid; in main()
234 : "+a" (nr) : [ss] "m" (ss) in main()
259 nr = SYS_getpid; in main()
261 asm volatile ("xorl %%ebp, %%ebp; mov %[ss], %%ss; SYSENTER" : "+a" (nr) in main()
274 nr = 20; /* compat getpid */ in main()
[all …]
Dsyscall_numbering.c20 static void check_enosys(unsigned long nr, bool *ok) in check_enosys() argument
25 long ret = syscall(nr, 0, 0, 0, 0, 0, 0); in check_enosys()
27 printf("[FAIL]\tsyscall %lu succeeded, but it should have failed\n", nr); in check_enosys()
30 printf("[FAIL]\tsyscall %lu had error code %d, but it should have reported ENOSYS\n", nr, errno); in check_enosys()
/tools/perf/tests/
Dthread-map.c35 TEST_ASSERT_VAL("wrong nr", map->nr == 1); in test__thread_map()
51 TEST_ASSERT_VAL("wrong nr", map->nr == 1); in test__thread_map()
70 TEST_ASSERT_VAL("wrong nr", map->nr == 1); in process_event()
77 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event()
128 TEST_ASSERT_VAL("thread_map count != 1", threads->nr == 1); in test__thread_map_remove()
136 TEST_ASSERT_VAL("thread_map count != 0", threads->nr == 0); in test__thread_map_remove()
144 for (i = 0; i < threads->nr; i++) in test__thread_map_remove()
Ddso-data.c182 long nr = 0; in open_files_cnt() local
195 nr++; in open_files_cnt()
199 return nr - 1; in open_files_cnt()
254 long nr_end, nr = open_files_cnt(); in test__dso_data_cache() local
263 limit = nr * 4; in test__dso_data_cache()
306 pr_debug("nr start %ld, nr stop %ld\n", nr, nr_end); in test__dso_data_cache()
307 TEST_ASSERT_VAL("failed leaking files", nr == nr_end); in test__dso_data_cache()
314 long nr_end, nr = open_files_cnt(); in test__dso_data_reopen() local
337 !set_fd_limit((nr + 3))); in test__dso_data_reopen()
382 pr_debug("nr start %ld, nr stop %ld\n", nr, nr_end); in test__dso_data_reopen()
[all …]
/tools/lib/subcmd/
Dsubcmd-util.h39 #define ALLOC_GROW(x, nr, alloc) \ argument
41 if ((nr) > alloc) { \
42 if (alloc_nr(alloc) < (nr)) \
43 alloc = (nr); \
/tools/testing/selftests/vm/
Duserfaultfd.c410 unsigned long nr, cpu; in uffd_test_ctx_init_ext() local
423 for (nr = 0; nr < nr_pages; nr++) { in uffd_test_ctx_init_ext()
424 *area_mutex(area_src, nr) = in uffd_test_ctx_init_ext()
426 count_verify[nr] = *area_count(area_src, nr) = 1; in uffd_test_ctx_init_ext()
434 *(area_count(area_src, nr) + 1) = 1; in uffd_test_ctx_init_ext()
900 unsigned long nr; in faulting_process() local
922 for (nr = 0; nr < split_nr_pages; nr++) { in faulting_process()
924 unsigned long offset = nr * page_size; in faulting_process()
928 if (steps == 1 && nr == lastnr) in faulting_process()
931 lastnr = nr; in faulting_process()
[all …]
/tools/include/vdso/
Dbits.h7 #define BIT(nr) (UL(1) << (nr)) argument

1234567