Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 119) sorted by relevance

12345

/tools/include/tools/
Dle_byteshift.h6 static inline uint16_t __get_unaligned_le16(const uint8_t *p) in __get_unaligned_le16() argument
8 return p[0] | p[1] << 8; in __get_unaligned_le16()
11 static inline uint32_t __get_unaligned_le32(const uint8_t *p) in __get_unaligned_le32() argument
13 return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; in __get_unaligned_le32()
16 static inline uint64_t __get_unaligned_le64(const uint8_t *p) in __get_unaligned_le64() argument
18 return (uint64_t)__get_unaligned_le32(p + 4) << 32 | in __get_unaligned_le64()
19 __get_unaligned_le32(p); in __get_unaligned_le64()
22 static inline void __put_unaligned_le16(uint16_t val, uint8_t *p) in __put_unaligned_le16() argument
24 *p++ = val; in __put_unaligned_le16()
25 *p++ = val >> 8; in __put_unaligned_le16()
[all …]
Dbe_byteshift.h6 static inline uint16_t __get_unaligned_be16(const uint8_t *p) in __get_unaligned_be16() argument
8 return p[0] << 8 | p[1]; in __get_unaligned_be16()
11 static inline uint32_t __get_unaligned_be32(const uint8_t *p) in __get_unaligned_be32() argument
13 return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; in __get_unaligned_be32()
16 static inline uint64_t __get_unaligned_be64(const uint8_t *p) in __get_unaligned_be64() argument
18 return (uint64_t)__get_unaligned_be32(p) << 32 | in __get_unaligned_be64()
19 __get_unaligned_be32(p + 4); in __get_unaligned_be64()
22 static inline void __put_unaligned_be16(uint16_t val, uint8_t *p) in __put_unaligned_be16() argument
24 *p++ = val >> 8; in __put_unaligned_be16()
25 *p++ = val; in __put_unaligned_be16()
[all …]
/tools/perf/ui/
Dprogress.c4 static void null_progress__update(struct ui_progress *p __maybe_unused) in null_progress__update()
15 void ui_progress__update(struct ui_progress *p, u64 adv) in ui_progress__update() argument
17 p->curr += adv; in ui_progress__update()
19 if (p->curr >= p->next) { in ui_progress__update()
20 p->next += p->step; in ui_progress__update()
21 ui_progress__ops->update(p); in ui_progress__update()
25 void ui_progress__init(struct ui_progress *p, u64 total, const char *title) in ui_progress__init() argument
27 p->curr = 0; in ui_progress__init()
28 p->next = p->step = total / 16; in ui_progress__init()
29 p->total = total; in ui_progress__init()
[all …]
/tools/lib/traceevent/
Dplugin_scsi.c155 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw6() argument
157 const char *ret = p->buffer + p->len; in scsi_trace_rw6()
165 trace_seq_printf(p, "lba=%llu txlen=%llu", in scsi_trace_rw6()
167 trace_seq_putc(p, 0); in scsi_trace_rw6()
172 scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw10() argument
174 const char *ret = p->buffer + p->len; in scsi_trace_rw10()
184 trace_seq_printf(p, "lba=%llu txlen=%llu protect=%u", in scsi_trace_rw10()
189 trace_seq_printf(p, " unmap=%u", cdb[1] >> 3 & 1); in scsi_trace_rw10()
191 trace_seq_putc(p, 0); in scsi_trace_rw10()
196 scsi_trace_rw12(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw12() argument
[all …]
/tools/perf/bench/
Dnuma.c42 #define tprintf(x...) do { if (g && g->p.show_details >= 0) printf(x); } while (0)
47 #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
152 struct params p; member
222 for (i = 0; i < g->p.nr_nodes; i++) { in nr_numa_nodes()
269 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_cpu()
272 BUG_ON(target_cpu < 0 || target_cpu >= g->p.nr_cpus); in bind_to_cpu()
284 int cpus_per_node = g->p.nr_cpus / nr_numa_nodes(); in bind_to_node()
289 BUG_ON(cpus_per_node * nr_numa_nodes() != g->p.nr_cpus); in bind_to_node()
298 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_node()
304 BUG_ON(cpu_stop > g->p.nr_cpus); in bind_to_node()
[all …]
/tools/virtio/linux/
Dkernel.h32 #define virt_to_phys(p) ((unsigned long)p) argument
35 #define page_to_phys(p) ((dma_addr_t)(unsigned long)(p)) argument
36 #define virt_to_page(p) ((struct page *)((unsigned long)p & PAGE_MASK)) argument
38 #define offset_in_page(p) (((unsigned long)p) % PAGE_SIZE) argument
53 void *p = kmalloc(s, gfp); in kzalloc() local
55 memset(p, 0, s); in kzalloc()
56 return p; in kzalloc()
59 static inline void kfree(void *p) in kfree() argument
61 if (p >= __kfree_ignore_start && p < __kfree_ignore_end) in kfree()
63 free(p); in kfree()
[all …]
/tools/usb/usbip/libsrc/
Dnames.c114 struct product *p; in names_product() local
116 p = products[hashnum((vendorid << 16) | productid)]; in names_product()
117 for (; p; p = p->next) in names_product()
118 if (p->vendorid == vendorid && p->productid == productid) in names_product()
119 return p->name; in names_product()
148 struct protocol *p; in names_protocol() local
150 p = protocols[hashnum((classid << 16) | (subclassid << 8) in names_protocol()
152 for (; p; p = p->next) in names_protocol()
153 if (p->classid == classid && p->subclassid == subclassid && in names_protocol()
154 p->protocolid == protocolid) in names_protocol()
[all …]
/tools/testing/selftests/powerpc/pmu/ebb/
Dtrace.c38 static bool trace_check_bounds(struct trace_buffer *tb, void *p) in trace_check_bounds() argument
40 return p < ((void *)tb + tb->size); in trace_check_bounds()
43 static bool trace_check_alloc(struct trace_buffer *tb, void *p) in trace_check_alloc() argument
54 if (!trace_check_bounds(tb, p)) { in trace_check_alloc()
64 void *p, *newtail; in trace_alloc() local
66 p = tb->tail; in trace_alloc()
73 return p; in trace_alloc()
90 u64 *p; in trace_log_reg() local
97 p = (u64 *)e->data; in trace_log_reg()
98 *p++ = reg; in trace_log_reg()
[all …]
/tools/perf/util/
Drblist.c16 struct rb_node **p = &rblist->entries.rb_node; in rblist__add_node() local
19 while (*p != NULL) { in rblist__add_node()
22 parent = *p; in rblist__add_node()
26 p = &(*p)->rb_left; in rblist__add_node()
28 p = &(*p)->rb_right; in rblist__add_node()
37 rb_link_node(new_node, parent, p); in rblist__add_node()
55 struct rb_node **p = &rblist->entries.rb_node; in __rblist__findnew() local
58 while (*p != NULL) { in __rblist__findnew()
61 parent = *p; in __rblist__findnew()
65 p = &(*p)->rb_left; in __rblist__findnew()
[all …]
Dstring.c14 char *p; in perf_atoll() local
20 length = strtoll(str, &p, 10); in perf_atoll()
21 switch (c = *p++) { in perf_atoll()
23 if (*p) in perf_atoll()
47 if (strcmp(p, "b") != 0) in perf_atoll()
50 if (strcmp(p, "B") != 0) in perf_atoll()
102 char **p; in argv_free() local
103 for (p = argv; *p; p++) in argv_free()
104 zfree(p); in argv_free()
139 const char *p = str; in argv_split() local
[all …]
Dstrfilter.c16 if (node->p && !is_operator(*node->p)) in strfilter_node__delete()
17 zfree((char **)&node->p); in strfilter_node__delete()
34 const char *p; in get_token() local
40 p = s; in get_token()
44 p = s + 1; in get_token()
48 while (*p && !is_separator(*p) && !isspace(*p)) in get_token()
49 p++; in get_token()
51 if (*(p - 1) == '\\' || (*p == '!' && *(p - 1) == '[')) { in get_token()
52 p++; in get_token()
57 *e = p; in get_token()
[all …]
Dparse-regs-options.c12 char *s, *os = NULL, *p; in parse_regs() local
32 p = strchr(s, ','); in parse_regs()
33 if (p) in parse_regs()
34 *p = '\0'; in parse_regs()
57 if (!p) in parse_regs()
60 s = p + 1; in parse_regs()
Dparse-options.c21 static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, in get_arg() argument
24 if (p->opt) { in get_arg()
25 *arg = p->opt; in get_arg()
26 p->opt = NULL; in get_arg()
27 } else if ((opt->flags & PARSE_OPT_LASTARG_DEFAULT) && (p->argc == 1 || in get_arg()
28 **(p->argv + 1) == '-')) { in get_arg()
30 } else if (p->argc > 1) { in get_arg()
31 p->argc--; in get_arg()
32 *arg = *++p->argv; in get_arg()
38 static int get_value(struct parse_opt_ctx_t *p, in get_value() argument
[all …]
/tools/perf/
Dbuiltin-timechart.c216 struct per_pid *p; in pid_set_comm() local
218 p = find_create_pid(tchart, pid); in pid_set_comm()
219 c = p->all; in pid_set_comm()
222 p->current = c; in pid_set_comm()
227 p->current = c; in pid_set_comm()
235 p->current = c; in pid_set_comm()
236 c->next = p->all; in pid_set_comm()
237 p->all = c; in pid_set_comm()
242 struct per_pid *p, *pp; in pid_fork() local
243 p = find_create_pid(tchart, pid); in pid_fork()
[all …]
/tools/power/cpupower/debug/i386/
Ddump_psb.c61 decode_pst(char *p, int npstates) in decode_pst() argument
67 fid = *p++; in decode_pst()
68 vid = *p++; in decode_pst()
82 void decode_psb(char *p, int numpst) in decode_psb() argument
88 psb = (struct psb_header*) p; in decode_psb()
104 p = ((char *) psb) + sizeof(struct psb_header); in decode_psb()
112 pst = (struct pst_header*) p; in decode_psb()
128 decode_pst(p + sizeof(struct pst_header), pst->numpstates); in decode_psb()
131 p += sizeof(struct pst_header) + 2*pst->numpstates; in decode_psb()
155 char *p; in main() local
[all …]
/tools/include/linux/
Dcompiler.h62 static __always_inline void __read_once_size(const volatile void *p, void *res, int size) in __read_once_size() argument
65 case 1: *(__u8_alias_t *) res = *(volatile __u8_alias_t *) p; break; in __read_once_size()
66 case 2: *(__u16_alias_t *) res = *(volatile __u16_alias_t *) p; break; in __read_once_size()
67 case 4: *(__u32_alias_t *) res = *(volatile __u32_alias_t *) p; break; in __read_once_size()
68 case 8: *(__u64_alias_t *) res = *(volatile __u64_alias_t *) p; break; in __read_once_size()
71 __builtin_memcpy((void *)res, (const void *)p, size); in __read_once_size()
76 static __always_inline void __write_once_size(volatile void *p, void *res, int size) in __write_once_size() argument
79 case 1: *(volatile __u8_alias_t *) p = *(__u8_alias_t *) res; break; in __write_once_size()
80 case 2: *(volatile __u16_alias_t *) p = *(__u16_alias_t *) res; break; in __write_once_size()
81 case 4: *(volatile __u32_alias_t *) p = *(__u32_alias_t *) res; break; in __write_once_size()
[all …]
/tools/build/
Dfixdep.c50 char *p; in parse_dep_file() local
61 p = m; in parse_dep_file()
62 while (p < end && *p != ' ' && *p != '\\' && *p != '\n') in parse_dep_file()
63 p++; in parse_dep_file()
65 is_target = (*(p-1) == ':'); in parse_dep_file()
72 memcpy(s, m, p-m); in parse_dep_file()
73 s[p - m] = 0; in parse_dep_file()
107 m = p + 1; in parse_dep_file()
/tools/testing/selftests/powerpc/mm/
Dhugetlb_vs_thp_test.c13 char *p; in test_body() local
17 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body()
19 if (p != MAP_FAILED) { in test_body()
33 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body()
35 if (p == MAP_FAILED) { in test_body()
54 *p = 0xf; in test_body()
/tools/hv/
Dhv_kvp_daemon.c420 char *p, buf[512]; in kvp_get_os_info() local
434 p = strchr(os_version, '-'); in kvp_get_os_info()
435 if (p) in kvp_get_os_info()
436 *p = '\0'; in kvp_get_os_info()
452 p = strchr(buf, '='); in kvp_get_os_info()
453 if (!p) in kvp_get_os_info()
455 *p++ = 0; in kvp_get_os_info()
458 value = p; in kvp_get_os_info()
459 q = p; in kvp_get_os_info()
460 while (*p) { in kvp_get_os_info()
[all …]
/tools/testing/selftests/memfd/
Dfuse_test.c126 void *p; in mfd_assert_mmap_shared() local
128 p = mmap(NULL, in mfd_assert_mmap_shared()
134 if (p == MAP_FAILED) { in mfd_assert_mmap_shared()
139 return p; in mfd_assert_mmap_shared()
144 void *p; in mfd_assert_mmap_private() local
146 p = mmap(NULL, in mfd_assert_mmap_private()
152 if (p == MAP_FAILED) { in mfd_assert_mmap_private()
157 return p; in mfd_assert_mmap_private()
232 void *p; in main() local
255 p = mfd_assert_mmap_shared(mfd); in main()
[all …]
Dmemfd_test.c150 void *p; in mfd_assert_mmap_shared() local
152 p = mmap(NULL, in mfd_assert_mmap_shared()
158 if (p == MAP_FAILED) { in mfd_assert_mmap_shared()
163 return p; in mfd_assert_mmap_shared()
168 void *p; in mfd_assert_mmap_private() local
170 p = mmap(NULL, in mfd_assert_mmap_private()
176 if (p == MAP_FAILED) { in mfd_assert_mmap_private()
181 return p; in mfd_assert_mmap_private()
215 void *p; in mfd_assert_read() local
225 p = mmap(NULL, in mfd_assert_read()
[all …]
/tools/perf/ui/gtk/
Dprogress.c10 static void gtk_ui_progress__update(struct ui_progress *p) in gtk_ui_progress__update() argument
12 double fraction = p->total ? 1.0 * p->curr / p->total : 0.0; in gtk_ui_progress__update()
17 GtkWidget *label = gtk_label_new(p->title); in gtk_ui_progress__update()
35 snprintf(buf, sizeof(buf), "%"PRIu64" / %"PRIu64, p->curr, p->total); in gtk_ui_progress__update()
/tools/lib/util/
Dfind_next_bit.c27 const unsigned long *p = addr + BITOP_WORD(offset); in find_next_bit() local
36 tmp = *(p++); in find_next_bit()
46 if ((tmp = *(p++))) in find_next_bit()
53 tmp = *p; in find_next_bit()
70 const unsigned long *p = addr; in find_first_bit() local
75 if ((tmp = *(p++))) in find_first_bit()
83 tmp = (*p) & (~0UL >> (BITS_PER_LONG - size)); in find_first_bit()
/tools/testing/selftests/powerpc/pmu/
Dl3_bank_test.c20 char *p; in l3_bank_test() local
23 p = malloc(MALLOC_SIZE); in l3_bank_test()
24 FAIL_IF(!p); in l3_bank_test()
31 p[i] = i; in l3_bank_test()
40 free(p); in l3_bank_test()
/tools/perf/ui/tui/
Dprogress.c8 static void tui_progress__update(struct ui_progress *p) in tui_progress__update() argument
18 if (p->total == 0) in tui_progress__update()
27 SLsmg_write_string((char *)p->title); in tui_progress__update()
30 bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; in tui_progress__update()

12345