Lines Matching refs:cpu
138 int cpu, len; member
168 int cpu, nios; member
185 u32 cpu; /* for which cpu */ member
484 static inline void pdc_dr_update(struct devpath *dpp, int cpu, int data_read) in pdc_dr_update() argument
486 dpp->stats[cpu].data_read += data_read; in pdc_dr_update()
489 static inline void pdc_nev_update(struct devpath *dpp, int cpu, int nevents) in pdc_nev_update() argument
491 dpp->stats[cpu].nevents += nevents; in pdc_nev_update()
607 static int lock_on_cpu(int cpu) in lock_on_cpu() argument
613 CPU_SET(cpu, &cpu_mask); in lock_on_cpu()
856 static int net_send_header(int fd, int cpu, char *buts_name, int len) in net_send_header() argument
865 hdr.cpu = cpu; in net_send_header()
876 static void net_send_open_close(int fd, int cpu, char *buts_name, int len) in net_send_open_close() argument
880 net_send_header(fd, cpu, buts_name, len); in net_send_open_close()
884 static void net_send_open(int fd, int cpu, char *buts_name) in net_send_open() argument
886 net_send_open_close(fd, cpu, buts_name, 0); in net_send_open()
1007 int cpu; in open_client_connections() local
1010 for (cpu = 0; cpu < ncpus; cpu++) { in open_client_connections()
1011 cl_fds[cpu] = net_setup_client(); in open_client_connections()
1012 if (cl_fds[cpu] < 0) in open_client_connections()
1018 while (cpu > 0) in open_client_connections()
1019 close(cl_fds[cpu--]); in open_client_connections()
1027 int cpu, *fdp; in close_client_connections() local
1029 for (cpu = 0, fdp = cl_fds; cpu < ncpus; cpu++, fdp++) { in close_client_connections()
1117 static inline struct trace_buf *alloc_trace_buf(int cpu, int bufsize) in alloc_trace_buf() argument
1125 tbp->cpu = cpu; in alloc_trace_buf()
1133 int cpu; in free_tracer_heads() local
1136 for (cpu = 0, hd = dpp->heads; cpu < ncpus; cpu++, hd++) { in free_tracer_heads()
1154 int cpu; in setup_tracer_devpaths() local
1159 for (cpu = 0, hd = dpp->heads; cpu < ncpus; cpu++, hd++) { in setup_tracer_devpaths()
1169 static inline void add_trace_buf(struct devpath *dpp, int cpu, in add_trace_buf() argument
1173 struct tracer_devpath_head *hd = &dpp->heads[cpu]; in add_trace_buf()
1181 *tbpp = alloc_trace_buf(cpu, buf_size); in add_trace_buf()
1256 int fd = cl_fds[tbp->cpu]; in flush_subbuf_net()
1259 if (net_send_header(fd, tbp->cpu, dpp->buts_name, tbp->len)) in flush_subbuf_net()
1281 if (cl_fds[tbp->cpu] >= 0) { in handle_list_net()
1283 close(cl_fds[tbp->cpu]); in handle_list_net()
1284 cl_fds[tbp->cpu] = -1; in handle_list_net()
1360 pdc_nev_update(tbp->dpp, tbp->cpu, nevents); in handle_list_file()
1389 int cpu; in __process_trace_bufs() local
1398 for (cpu = 0; cpu < ncpus; cpu++, hd++) { in __process_trace_bufs()
1432 static inline void read_err(int cpu, char *ifn) in read_err() argument
1436 cpu, ifn, errno, strerror(errno)); in read_err()
1460 if (net_send_header(iop->ofd, tp->cpu, dpp->buts_name, iop->ready)) in net_sendfile_data()
1465 static int fill_ofname(struct io_info *iop, int cpu) in fill_ofname() argument
1506 output_name, cpu); in fill_ofname()
1509 iop->dpp->buts_name, cpu); in fill_ofname()
1528 static int iop_open(struct io_info *iop, int cpu) in iop_open() argument
1531 if (fill_ofname(iop, cpu)) in iop_open()
1617 debugfs_path, dpp->buts_name, tp->cpu); in open_ios()
1622 tp->cpu, iop->ifn, errno, strerror(errno)); in open_ios()
1637 net_send_open(iop->ofd, tp->cpu, dpp->buts_name); in open_ios()
1639 if (iop_open(iop, tp->cpu)) in open_ios()
1646 net_send_open(cl_fds[tp->cpu], tp->cpu, dpp->buts_name); in open_ios()
1682 pdc_dr_update(iop->dpp, tp->cpu, ret); in handle_pfds_file()
1694 read_err(tp->cpu, iop->ifn); in handle_pfds_file()
1723 pdc_dr_update(iop->dpp, tp->cpu, in handle_pfds_netclient()
1747 tbp = alloc_trace_buf(tp->cpu, buf_size); in handle_pfds_entries()
1752 pdc_dr_update(iop->dpp, tp->cpu, tbp->len); in handle_pfds_entries()
1753 add_trace_buf(iop->dpp, tp->cpu, &tbp); in handle_pfds_entries()
1763 read_err(tp->cpu, iop->ifn); in handle_pfds_entries()
1784 ret = lock_on_cpu(tp->cpu); in thread_main()
1807 tp->cpu, errno, strerror(errno)); in thread_main()
1825 static int start_tracer(int cpu) in start_tracer() argument
1834 tp->cpu = cpu; in start_tracer()
1838 cpu, errno, strerror(errno)); in start_tracer()
1849 int cpu; in start_tracers() local
1852 for (cpu = 0; cpu < ncpus; cpu++) in start_tracers()
1853 if (start_tracer(cpu)) in start_tracers()
1856 wait_tracers_ready(cpu); in start_tracers()
1863 tp->cpu, tp->status, strerror(tp->status)); in start_tracers()
1916 tp->cpu, ret); in wait_tracers()
1958 int cpu; in show_stats() local
1970 for (cpu = 0, sp = dpp->stats; cpu < dpp->ncpus; cpu++, sp++) { in show_stats()
1981 cpu, sp->nevents, (sp->data_read + 1023) >> 10); in show_stats()
2240 int cpu; in device_done() local
2243 for (cpu = 0, iop = dpp->ios; cpu < ncpus; cpu++, iop++) in device_done()
2300 int cpu; in nc_add_dpp() local
2323 for (cpu = 0, iop = dpp->ios; cpu < nc->ncpus; cpu++, iop++) { in nc_add_dpp()
2328 if (iop_open(iop, cpu)) in nc_add_dpp()
2338 while (cpu >= 0) in nc_add_dpp()
2339 close_iop(&dpp->ios[cpu--]); in nc_add_dpp()
2368 struct io_info *iop = &dpp->ios[bnh->cpu]; in net_client_read_data()
2379 pdc_dr_update(dpp, bnh->cpu, ret); in net_client_read_data()
2412 bnh.cpu = be32_to_cpu(bnh.cpu); in net_client_data()
2445 dpp->drops = bnh.cpu; in net_client_data()