Lines Matching refs:file

56 static int spufs_attr_open(struct inode *inode, struct file *file,  in spufs_attr_open()  argument
71 file->private_data = attr; in spufs_attr_open()
73 return nonseekable_open(inode, file); in spufs_attr_open()
76 static int spufs_attr_release(struct inode *inode, struct file *file) in spufs_attr_release() argument
78 kfree(file->private_data); in spufs_attr_release()
82 static ssize_t spufs_attr_read(struct file *file, char __user *buf, in spufs_attr_read() argument
89 attr = file->private_data; in spufs_attr_read()
115 static ssize_t spufs_attr_write(struct file *file, const char __user *buf, in spufs_attr_write() argument
123 attr = file->private_data; in spufs_attr_write()
146 static int __fops ## _open(struct inode *inode, struct file *file) \
149 return spufs_attr_open(inode, file, __get, __set, __fmt); \
161 spufs_mem_open(struct inode *inode, struct file *file) in spufs_mem_open() argument
167 file->private_data = ctx; in spufs_mem_open()
175 spufs_mem_release(struct inode *inode, struct file *file) in spufs_mem_release() argument
197 spufs_mem_read(struct file *file, char __user *buffer, in spufs_mem_read() argument
200 struct spu_context *ctx = file->private_data; in spufs_mem_read()
213 spufs_mem_write(struct file *file, const char __user *buffer, in spufs_mem_write() argument
216 struct spu_context *ctx = file->private_data; in spufs_mem_write()
294 static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) in spufs_mem_mmap() argument
385 static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma) in spufs_cntl_mmap() argument
428 static int spufs_cntl_open(struct inode *inode, struct file *file) in spufs_cntl_open() argument
434 file->private_data = ctx; in spufs_cntl_open()
438 return simple_attr_open(inode, file, spufs_cntl_get, in spufs_cntl_open()
443 spufs_cntl_release(struct inode *inode, struct file *file) in spufs_cntl_release() argument
448 simple_attr_release(inode, file); in spufs_cntl_release()
467 spufs_regs_open(struct inode *inode, struct file *file) in spufs_regs_open() argument
470 file->private_data = i->i_ctx; in spufs_regs_open()
484 spufs_regs_read(struct file *file, char __user *buffer, in spufs_regs_read() argument
488 struct spu_context *ctx = file->private_data; in spufs_regs_read()
504 spufs_regs_write(struct file *file, const char __user *buffer, in spufs_regs_write() argument
507 struct spu_context *ctx = file->private_data; in spufs_regs_write()
542 spufs_fpcr_read(struct file *file, char __user * buffer, in spufs_fpcr_read() argument
546 struct spu_context *ctx = file->private_data; in spufs_fpcr_read()
557 spufs_fpcr_write(struct file *file, const char __user * buffer, in spufs_fpcr_write() argument
560 struct spu_context *ctx = file->private_data; in spufs_fpcr_write()
586 static int spufs_pipe_open(struct inode *inode, struct file *file) in spufs_pipe_open() argument
589 file->private_data = i->i_ctx; in spufs_pipe_open()
591 return nonseekable_open(inode, file); in spufs_pipe_open()
602 static ssize_t spufs_mbox_read(struct file *file, char __user *buf, in spufs_mbox_read() argument
605 struct spu_context *ctx = file->private_data; in spufs_mbox_read()
653 static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf, in spufs_mbox_stat_read() argument
656 struct spu_context *ctx = file->private_data; in spufs_mbox_stat_read()
689 static int spufs_ibox_fasync(int fd, struct file *file, int on) in spufs_ibox_fasync() argument
691 struct spu_context *ctx = file->private_data; in spufs_ibox_fasync()
693 return fasync_helper(fd, file, on, &ctx->ibox_fasync); in spufs_ibox_fasync()
720 static ssize_t spufs_ibox_read(struct file *file, char __user *buf, in spufs_ibox_read() argument
723 struct spu_context *ctx = file->private_data; in spufs_ibox_read()
741 if (file->f_flags & O_NONBLOCK) { in spufs_ibox_read()
778 static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait) in spufs_ibox_poll() argument
780 struct spu_context *ctx = file->private_data; in spufs_ibox_poll()
783 poll_wait(file, &ctx->ibox_wq, wait); in spufs_ibox_poll()
804 static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf, in spufs_ibox_stat_read() argument
807 struct spu_context *ctx = file->private_data; in spufs_ibox_stat_read()
838 static int spufs_wbox_fasync(int fd, struct file *file, int on) in spufs_wbox_fasync() argument
840 struct spu_context *ctx = file->private_data; in spufs_wbox_fasync()
843 ret = fasync_helper(fd, file, on, &ctx->wbox_fasync); in spufs_wbox_fasync()
872 static ssize_t spufs_wbox_write(struct file *file, const char __user *buf, in spufs_wbox_write() argument
875 struct spu_context *ctx = file->private_data; in spufs_wbox_write()
898 if (file->f_flags & O_NONBLOCK) { in spufs_wbox_write()
928 static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait) in spufs_wbox_poll() argument
930 struct spu_context *ctx = file->private_data; in spufs_wbox_poll()
933 poll_wait(file, &ctx->wbox_wq, wait); in spufs_wbox_poll()
954 static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf, in spufs_wbox_stat_read() argument
957 struct spu_context *ctx = file->private_data; in spufs_wbox_stat_read()
982 static int spufs_signal1_open(struct inode *inode, struct file *file) in spufs_signal1_open() argument
988 file->private_data = ctx; in spufs_signal1_open()
992 return nonseekable_open(inode, file); in spufs_signal1_open()
996 spufs_signal1_release(struct inode *inode, struct file *file) in spufs_signal1_release() argument
1032 static ssize_t spufs_signal1_read(struct file *file, char __user *buf, in spufs_signal1_read() argument
1036 struct spu_context *ctx = file->private_data; in spufs_signal1_read()
1047 static ssize_t spufs_signal1_write(struct file *file, const char __user *buf, in spufs_signal1_write() argument
1054 ctx = file->private_data; in spufs_signal1_write()
1090 static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma) in spufs_signal1_mmap() argument
1119 static int spufs_signal2_open(struct inode *inode, struct file *file) in spufs_signal2_open() argument
1125 file->private_data = ctx; in spufs_signal2_open()
1129 return nonseekable_open(inode, file); in spufs_signal2_open()
1133 spufs_signal2_release(struct inode *inode, struct file *file) in spufs_signal2_release() argument
1169 static ssize_t spufs_signal2_read(struct file *file, char __user *buf, in spufs_signal2_read() argument
1172 struct spu_context *ctx = file->private_data; in spufs_signal2_read()
1184 static ssize_t spufs_signal2_write(struct file *file, const char __user *buf, in spufs_signal2_write() argument
1191 ctx = file->private_data; in spufs_signal2_write()
1228 static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma) in spufs_signal2_mmap() argument
1351 static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma) in spufs_mss_mmap() argument
1366 static int spufs_mss_open(struct inode *inode, struct file *file) in spufs_mss_open() argument
1371 file->private_data = i->i_ctx; in spufs_mss_open()
1377 return nonseekable_open(inode, file); in spufs_mss_open()
1381 spufs_mss_release(struct inode *inode, struct file *file) in spufs_mss_release() argument
1413 static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma) in spufs_psmap_mmap() argument
1425 static int spufs_psmap_open(struct inode *inode, struct file *file) in spufs_psmap_open() argument
1431 file->private_data = i->i_ctx; in spufs_psmap_open()
1435 return nonseekable_open(inode, file); in spufs_psmap_open()
1439 spufs_psmap_release(struct inode *inode, struct file *file) in spufs_psmap_release() argument
1473 static int spufs_mfc_mmap(struct file *file, struct vm_area_struct *vma) in spufs_mfc_mmap() argument
1488 static int spufs_mfc_open(struct inode *inode, struct file *file) in spufs_mfc_open() argument
1501 file->private_data = ctx; in spufs_mfc_open()
1505 return nonseekable_open(inode, file); in spufs_mfc_open()
1509 spufs_mfc_release(struct inode *inode, struct file *file) in spufs_mfc_release() argument
1565 static ssize_t spufs_mfc_read(struct file *file, char __user *buffer, in spufs_mfc_read() argument
1568 struct spu_context *ctx = file->private_data; in spufs_mfc_read()
1580 if (file->f_flags & O_NONBLOCK) { in spufs_mfc_read()
1691 static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer, in spufs_mfc_write() argument
1694 struct spu_context *ctx = file->private_data; in spufs_mfc_write()
1717 if (file->f_flags & O_NONBLOCK) { in spufs_mfc_write()
1741 static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait) in spufs_mfc_poll() argument
1743 struct spu_context *ctx = file->private_data; in spufs_mfc_poll()
1747 poll_wait(file, &ctx->mfc_wq, wait); in spufs_mfc_poll()
1771 static int spufs_mfc_flush(struct file *file, fl_owner_t id) in spufs_mfc_flush() argument
1773 struct spu_context *ctx = file->private_data; in spufs_mfc_flush()
1797 static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync) in spufs_mfc_fsync() argument
1799 struct inode *inode = file_inode(file); in spufs_mfc_fsync()
1803 err = spufs_mfc_flush(file, NULL); in spufs_mfc_fsync()
1809 static int spufs_mfc_fasync(int fd, struct file *file, int on) in spufs_mfc_fasync() argument
1811 struct spu_context *ctx = file->private_data; in spufs_mfc_fasync()
1813 return fasync_helper(fd, file, on, &ctx->mfc_fasync); in spufs_mfc_fasync()
1999 static int spufs_info_open(struct inode *inode, struct file *file) in spufs_info_open() argument
2003 file->private_data = ctx; in spufs_info_open()
2018 static int spufs_caps_open(struct inode *inode, struct file *file) in spufs_caps_open() argument
2020 return single_open(file, spufs_caps_show, SPUFS_I(inode)->i_ctx); in spufs_caps_open()
2044 static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf, in spufs_mbox_info_read() argument
2048 struct spu_context *ctx = file->private_data; in spufs_mbox_info_read()
2084 static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf, in spufs_ibox_info_read() argument
2087 struct spu_context *ctx = file->private_data; in spufs_ibox_info_read()
2127 static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf, in spufs_wbox_info_read() argument
2130 struct spu_context *ctx = file->private_data; in spufs_wbox_info_read()
2179 static ssize_t spufs_dma_info_read(struct file *file, char __user *buf, in spufs_dma_info_read() argument
2182 struct spu_context *ctx = file->private_data; in spufs_dma_info_read()
2236 static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf, in spufs_proxydma_info_read() argument
2239 struct spu_context *ctx = file->private_data; in spufs_proxydma_info_read()
2267 static int spufs_tid_open(struct inode *inode, struct file *file) in spufs_tid_open() argument
2269 return single_open(file, spufs_show_tid, SPUFS_I(inode)->i_ctx); in spufs_tid_open()
2357 static int spufs_stat_open(struct inode *inode, struct file *file) in spufs_stat_open() argument
2359 return single_open(file, spufs_show_stat, SPUFS_I(inode)->i_ctx); in spufs_stat_open()
2380 static int spufs_switch_log_open(struct inode *inode, struct file *file) in spufs_switch_log_open() argument
2412 static int spufs_switch_log_release(struct inode *inode, struct file *file) in spufs_switch_log_release() argument
2443 static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, in spufs_switch_log_read() argument
2446 struct inode *inode = file_inode(file); in spufs_switch_log_read()
2467 } else if (file->f_flags & O_NONBLOCK) { in spufs_switch_log_read()
2514 static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) in spufs_switch_log_poll() argument
2516 struct inode *inode = file_inode(file); in spufs_switch_log_poll()
2521 poll_wait(file, &ctx->switch_log->wait, wait); in spufs_switch_log_poll()
2611 static int spufs_ctx_open(struct inode *inode, struct file *file) in spufs_ctx_open() argument
2613 return single_open(file, spufs_show_ctx, SPUFS_I(inode)->i_ctx); in spufs_ctx_open()