• Home
  • Raw
  • Download

Lines Matching refs:fp

92 static int qib_get_base_info(struct file *fp, void __user *ubase,  in qib_get_base_info()  argument
95 struct qib_ctxtdata *rcd = ctxt_fp(fp); in qib_get_base_info()
111 master = !subctxt_fp(fp); in qib_get_base_info()
200 unsigned slave = subctxt_fp(fp) - 1; in qib_get_base_info()
209 cvt_kvaddr(&rcd->user_event_mask[subctxt_fp(fp)]); in qib_get_base_info()
237 kinfo->spi_subctxt = subctxt_fp(fp); in qib_get_base_info()
278 static int qib_tid_update(struct qib_ctxtdata *rcd, struct file *fp, in qib_tid_update() argument
290 unsigned subctxt = subctxt_fp(fp); in qib_tid_update()
312 tid = tidcursor_fp(fp); in qib_tid_update()
317 tid = tidcursor_fp(fp); in qib_tid_update()
449 tidcursor_fp(fp) = tid; in qib_tid_update()
991 static int qib_mmapf(struct file *fp, struct vm_area_struct *vma) in qib_mmapf() argument
999 rcd = ctxt_fp(fp); in qib_mmapf()
1031 ret = mmap_kvaddr(vma, pgaddr, rcd, subctxt_fp(fp)); in qib_mmapf()
1043 } else if (!subctxt_fp(fp)) { in qib_mmapf()
1050 unsigned slave = subctxt_fp(fp) - 1; in qib_mmapf()
1098 struct file *fp, in qib_poll_urgent() argument
1104 poll_wait(fp, &rcd->wait, pt); in qib_poll_urgent()
1120 struct file *fp, in qib_poll_next() argument
1126 poll_wait(fp, &rcd->wait, pt); in qib_poll_next()
1140 static unsigned int qib_poll(struct file *fp, struct poll_table_struct *pt) in qib_poll() argument
1145 rcd = ctxt_fp(fp); in qib_poll()
1149 pollflag = qib_poll_urgent(rcd, fp, pt); in qib_poll()
1151 pollflag = qib_poll_next(rcd, fp, pt); in qib_poll()
1260 struct file *fp, const struct qib_user_info *uinfo) in setup_ctxt() argument
1292 ctxt_fp(fp) = rcd; in setup_ctxt()
1318 static int choose_port_ctxt(struct file *fp, struct qib_devdata *dd, u32 port, in choose_port_ctxt() argument
1349 ret = ppd ? setup_ctxt(ppd, ctxt, fp, uinfo) : -ENETDOWN; in choose_port_ctxt()
1354 static int find_free_ctxt(int unit, struct file *fp, in find_free_ctxt() argument
1363 ret = choose_port_ctxt(fp, dd, uinfo->spu_port, uinfo); in find_free_ctxt()
1368 static int get_a_ctxt(struct file *fp, const struct qib_user_info *uinfo, in get_a_ctxt() argument
1414 ret = choose_port_ctxt(fp, udd, port, uinfo); in get_a_ctxt()
1421 ret = choose_port_ctxt(fp, dd, port, uinfo); in get_a_ctxt()
1435 static int find_shared_ctxt(struct file *fp, in find_shared_ctxt() argument
1465 ctxt_fp(fp) = rcd; in find_shared_ctxt()
1466 subctxt_fp(fp) = rcd->cnt++; in find_shared_ctxt()
1467 rcd->subpid[subctxt_fp(fp)] = current->pid; in find_shared_ctxt()
1468 tidcursor_fp(fp) = 0; in find_shared_ctxt()
1469 rcd->active_slaves |= 1 << subctxt_fp(fp); in find_shared_ctxt()
1479 static int qib_open(struct inode *in, struct file *fp) in qib_open() argument
1482 fp->private_data = kzalloc(sizeof(struct qib_filedata), GFP_KERNEL); in qib_open()
1483 if (fp->private_data) /* no cpu affinity by default */ in qib_open()
1484 ((struct qib_filedata *)fp->private_data)->rec_cpu_num = -1; in qib_open()
1485 return fp->private_data ? 0 : -ENOMEM; in qib_open()
1491 static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo) in qib_assign_ctxt() argument
1498 if (ctxt_fp(fp)) { in qib_assign_ctxt()
1519 ret = find_shared_ctxt(fp, uinfo); in qib_assign_ctxt()
1527 i_minor = iminor(file_inode(fp)) - QIB_USER_MINOR_BASE; in qib_assign_ctxt()
1529 ret = find_free_ctxt(i_minor - 1, fp, uinfo); in qib_assign_ctxt()
1531 ret = get_a_ctxt(fp, uinfo, alg); in qib_assign_ctxt()
1535 struct qib_filedata *fd = fp->private_data; in qib_assign_ctxt()
1582 static int qib_do_user_init(struct file *fp, in qib_do_user_init() argument
1586 struct qib_ctxtdata *rcd = ctxt_fp(fp); in qib_do_user_init()
1591 if (subctxt_fp(fp)) { in qib_do_user_init()
1723 static int qib_close(struct inode *in, struct file *fp) in qib_close() argument
1735 fd = fp->private_data; in qib_close()
1736 fp->private_data = NULL; in qib_close()
1814 static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo) in qib_ctxt_info() argument
1819 struct qib_ctxtdata *rcd = ctxt_fp(fp); in qib_ctxt_info()
1822 fd = fp->private_data; in qib_ctxt_info()
1828 info.subctxt = subctxt_fp(fp); in qib_ctxt_info()
1969 static ssize_t qib_write(struct file *fp, const char __user *data, in qib_write() argument
2081 rcd = ctxt_fp(fp); in qib_write()
2089 ret = qib_assign_ctxt(fp, &cmd.cmd.user_info); in qib_write()
2095 ret = qib_do_user_init(fp, &cmd.cmd.user_info); in qib_write()
2098 ret = qib_get_base_info(fp, (void __user *) (unsigned long) in qib_write()
2104 ret = qib_manage_rcvq(rcd, subctxt_fp(fp), cmd.cmd.recv_ctrl); in qib_write()
2108 ret = qib_ctxt_info(fp, (struct qib_ctxt_info __user *) in qib_write()
2113 ret = qib_tid_update(rcd, fp, &cmd.cmd.tid_info); in qib_write()
2117 ret = qib_tid_free(rcd, subctxt_fp(fp), &cmd.cmd.tid_info); in qib_write()
2142 ret = qib_sdma_get_inflight(user_sdma_queue_fp(fp), in qib_write()
2149 user_sdma_queue_fp(fp), in qib_write()
2155 ret = qib_user_event_ack(rcd, subctxt_fp(fp), in qib_write()
2170 struct qib_filedata *fp = iocb->ki_filp->private_data; in qib_aio_write() local
2172 struct qib_user_sdma_queue *pq = fp->pq; in qib_aio_write()