2 * SPU file system -- file contents
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
6 * Author: Arnd Bergmann <arndb@de.ibm.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <linux/ioctl.h>
27 #include <linux/module.h>
28 #include <linux/pagemap.h>
29 #include <linux/poll.h>
30 #include <linux/ptrace.h>
33 #include <asm/semaphore.h>
35 #include <asm/uaccess.h>
41 spufs_mem_open(struct inode *inode, struct file *file)
43 struct spufs_inode_info *i = SPUFS_I(inode);
44 file->private_data = i->i_ctx;
45 file->f_mapping = i->i_ctx->local_store;
50 spufs_mem_read(struct file *file, char __user *buffer,
51 size_t size, loff_t *pos)
53 struct spu_context *ctx = file->private_data;
59 local_store = ctx->ops->get_ls(ctx);
60 ret = simple_read_from_buffer(buffer, size, pos, local_store, LS_SIZE);
67 spufs_mem_write(struct file *file, const char __user *buffer,
68 size_t size, loff_t *pos)
70 struct spu_context *ctx = file->private_data;
74 size = min_t(ssize_t, LS_SIZE - *pos, size);
81 local_store = ctx->ops->get_ls(ctx);
82 ret = copy_from_user(local_store + *pos - size,
83 buffer, size) ? -EFAULT : size;
89 #ifdef CONFIG_SPARSEMEM
91 spufs_mem_mmap_nopage(struct vm_area_struct *vma,
92 unsigned long address, int *type)
94 struct page *page = NOPAGE_SIGBUS;
96 struct spu_context *ctx = vma->vm_file->private_data;
97 unsigned long offset = address - vma->vm_start;
98 offset += vma->vm_pgoff << PAGE_SHIFT;
102 if (ctx->state == SPU_STATE_SAVED)
103 page = vmalloc_to_page(ctx->csa.lscsa->ls + offset);
105 page = pfn_to_page((ctx->spu->local_store_phys + offset)
111 *type = VM_FAULT_MINOR;
113 page_cache_get(page);
117 static struct vm_operations_struct spufs_mem_mmap_vmops = {
118 .nopage = spufs_mem_mmap_nopage,
122 spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
124 if (!(vma->vm_flags & VM_SHARED))
128 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
131 vma->vm_ops = &spufs_mem_mmap_vmops;
136 static struct file_operations spufs_mem_fops = {
137 .open = spufs_mem_open,
138 .read = spufs_mem_read,
139 .write = spufs_mem_write,
140 .llseek = generic_file_llseek,
141 #ifdef CONFIG_SPARSEMEM
142 .mmap = spufs_mem_mmap,
147 spufs_regs_open(struct inode *inode, struct file *file)
149 struct spufs_inode_info *i = SPUFS_I(inode);
150 file->private_data = i->i_ctx;
155 spufs_regs_read(struct file *file, char __user *buffer,
156 size_t size, loff_t *pos)
158 struct spu_context *ctx = file->private_data;
159 struct spu_lscsa *lscsa = ctx->csa.lscsa;
162 spu_acquire_saved(ctx);
164 ret = simple_read_from_buffer(buffer, size, pos,
165 lscsa->gprs, sizeof lscsa->gprs);
172 spufs_regs_write(struct file *file, const char __user *buffer,
173 size_t size, loff_t *pos)
175 struct spu_context *ctx = file->private_data;
176 struct spu_lscsa *lscsa = ctx->csa.lscsa;
179 size = min_t(ssize_t, sizeof lscsa->gprs - *pos, size);
184 spu_acquire_saved(ctx);
186 ret = copy_from_user(lscsa->gprs + *pos - size,
187 buffer, size) ? -EFAULT : size;
193 static struct file_operations spufs_regs_fops = {
194 .open = spufs_regs_open,
195 .read = spufs_regs_read,
196 .write = spufs_regs_write,
197 .llseek = generic_file_llseek,
201 spufs_fpcr_read(struct file *file, char __user * buffer,
202 size_t size, loff_t * pos)
204 struct spu_context *ctx = file->private_data;
205 struct spu_lscsa *lscsa = ctx->csa.lscsa;
208 spu_acquire_saved(ctx);
210 ret = simple_read_from_buffer(buffer, size, pos,
211 &lscsa->fpcr, sizeof(lscsa->fpcr));
218 spufs_fpcr_write(struct file *file, const char __user * buffer,
219 size_t size, loff_t * pos)
221 struct spu_context *ctx = file->private_data;
222 struct spu_lscsa *lscsa = ctx->csa.lscsa;
225 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
230 spu_acquire_saved(ctx);
232 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
233 buffer, size) ? -EFAULT : size;
239 static struct file_operations spufs_fpcr_fops = {
240 .open = spufs_regs_open,
241 .read = spufs_fpcr_read,
242 .write = spufs_fpcr_write,
243 .llseek = generic_file_llseek,
246 /* generic open function for all pipe-like files */
247 static int spufs_pipe_open(struct inode *inode, struct file *file)
249 struct spufs_inode_info *i = SPUFS_I(inode);
250 file->private_data = i->i_ctx;
252 return nonseekable_open(inode, file);
255 static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
256 size_t len, loff_t *pos)
258 struct spu_context *ctx = file->private_data;
266 ret = ctx->ops->mbox_read(ctx, &mbox_data);
272 if (copy_to_user(buf, &mbox_data, sizeof mbox_data))
278 static struct file_operations spufs_mbox_fops = {
279 .open = spufs_pipe_open,
280 .read = spufs_mbox_read,
283 static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
284 size_t len, loff_t *pos)
286 struct spu_context *ctx = file->private_data;
294 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff;
298 if (copy_to_user(buf, &mbox_stat, sizeof mbox_stat))
304 static struct file_operations spufs_mbox_stat_fops = {
305 .open = spufs_pipe_open,
306 .read = spufs_mbox_stat_read,
309 /* low-level ibox access function */
310 size_t spu_ibox_read(struct spu_context *ctx, u32 *data)
312 return ctx->ops->ibox_read(ctx, data);
315 static int spufs_ibox_fasync(int fd, struct file *file, int on)
317 struct spu_context *ctx = file->private_data;
319 return fasync_helper(fd, file, on, &ctx->ibox_fasync);
322 /* interrupt-level ibox callback function. */
323 void spufs_ibox_callback(struct spu *spu)
325 struct spu_context *ctx = spu->ctx;
327 wake_up_all(&ctx->ibox_wq);
328 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN);
331 static ssize_t spufs_ibox_read(struct file *file, char __user *buf,
332 size_t len, loff_t *pos)
334 struct spu_context *ctx = file->private_data;
344 if (file->f_flags & O_NONBLOCK) {
345 if (!spu_ibox_read(ctx, &ibox_data))
348 ret = spufs_wait(ctx->ibox_wq, spu_ibox_read(ctx, &ibox_data));
357 if (copy_to_user(buf, &ibox_data, sizeof ibox_data))
363 static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
365 struct spu_context *ctx = file->private_data;
368 poll_wait(file, &ctx->ibox_wq, wait);
371 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM);
377 static struct file_operations spufs_ibox_fops = {
378 .open = spufs_pipe_open,
379 .read = spufs_ibox_read,
380 .poll = spufs_ibox_poll,
381 .fasync = spufs_ibox_fasync,
384 static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
385 size_t len, loff_t *pos)
387 struct spu_context *ctx = file->private_data;
394 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
397 if (copy_to_user(buf, &ibox_stat, sizeof ibox_stat))
403 static struct file_operations spufs_ibox_stat_fops = {
404 .open = spufs_pipe_open,
405 .read = spufs_ibox_stat_read,
408 /* low-level mailbox write */
409 size_t spu_wbox_write(struct spu_context *ctx, u32 data)
411 return ctx->ops->wbox_write(ctx, data);
414 static int spufs_wbox_fasync(int fd, struct file *file, int on)
416 struct spu_context *ctx = file->private_data;
419 ret = fasync_helper(fd, file, on, &ctx->wbox_fasync);
424 /* interrupt-level wbox callback function. */
425 void spufs_wbox_callback(struct spu *spu)
427 struct spu_context *ctx = spu->ctx;
429 wake_up_all(&ctx->wbox_wq);
430 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT);
433 static ssize_t spufs_wbox_write(struct file *file, const char __user *buf,
434 size_t len, loff_t *pos)
436 struct spu_context *ctx = file->private_data;
443 if (copy_from_user(&wbox_data, buf, sizeof wbox_data))
449 if (file->f_flags & O_NONBLOCK) {
450 if (!spu_wbox_write(ctx, wbox_data))
453 ret = spufs_wait(ctx->wbox_wq, spu_wbox_write(ctx, wbox_data));
458 return ret ? ret : sizeof wbox_data;
461 static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
463 struct spu_context *ctx = file->private_data;
466 poll_wait(file, &ctx->wbox_wq, wait);
469 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM);
475 static struct file_operations spufs_wbox_fops = {
476 .open = spufs_pipe_open,
477 .write = spufs_wbox_write,
478 .poll = spufs_wbox_poll,
479 .fasync = spufs_wbox_fasync,
482 static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
483 size_t len, loff_t *pos)
485 struct spu_context *ctx = file->private_data;
492 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
495 if (copy_to_user(buf, &wbox_stat, sizeof wbox_stat))
501 static struct file_operations spufs_wbox_stat_fops = {
502 .open = spufs_pipe_open,
503 .read = spufs_wbox_stat_read,
506 static ssize_t spufs_signal1_read(struct file *file, char __user *buf,
507 size_t len, loff_t *pos)
509 struct spu_context *ctx = file->private_data;
516 data = ctx->ops->signal1_read(ctx);
519 if (copy_to_user(buf, &data, 4))
525 static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
526 size_t len, loff_t *pos)
528 struct spu_context *ctx;
531 ctx = file->private_data;
536 if (copy_from_user(&data, buf, 4))
540 ctx->ops->signal1_write(ctx, data);
546 static struct file_operations spufs_signal1_fops = {
547 .open = spufs_pipe_open,
548 .read = spufs_signal1_read,
549 .write = spufs_signal1_write,
552 static ssize_t spufs_signal2_read(struct file *file, char __user *buf,
553 size_t len, loff_t *pos)
555 struct spu_context *ctx;
558 ctx = file->private_data;
564 data = ctx->ops->signal2_read(ctx);
567 if (copy_to_user(buf, &data, 4))
573 static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
574 size_t len, loff_t *pos)
576 struct spu_context *ctx;
579 ctx = file->private_data;
584 if (copy_from_user(&data, buf, 4))
588 ctx->ops->signal2_write(ctx, data);
594 static struct file_operations spufs_signal2_fops = {
595 .open = spufs_pipe_open,
596 .read = spufs_signal2_read,
597 .write = spufs_signal2_write,
600 static void spufs_signal1_type_set(void *data, u64 val)
602 struct spu_context *ctx = data;
605 ctx->ops->signal1_type_set(ctx, val);
609 static u64 spufs_signal1_type_get(void *data)
611 struct spu_context *ctx = data;
615 ret = ctx->ops->signal1_type_get(ctx);
620 DEFINE_SIMPLE_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get,
621 spufs_signal1_type_set, "%llu");
623 static void spufs_signal2_type_set(void *data, u64 val)
625 struct spu_context *ctx = data;
628 ctx->ops->signal2_type_set(ctx, val);
632 static u64 spufs_signal2_type_get(void *data)
634 struct spu_context *ctx = data;
638 ret = ctx->ops->signal2_type_get(ctx);
643 DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
644 spufs_signal2_type_set, "%llu");
647 static int spufs_mfc_open(struct inode *inode, struct file *file)
649 struct spufs_inode_info *i = SPUFS_I(inode);
650 struct spu_context *ctx = i->i_ctx;
652 /* we don't want to deal with DMA into other processes */
653 if (ctx->owner != current->mm)
656 if (atomic_read(&inode->i_count) != 1)
659 file->private_data = ctx;
660 return nonseekable_open(inode, file);
663 /* interrupt-level mfc callback function. */
664 void spufs_mfc_callback(struct spu *spu)
666 struct spu_context *ctx = spu->ctx;
668 wake_up_all(&ctx->mfc_wq);
670 pr_debug("%s %s\n", __FUNCTION__, spu->name);
671 if (ctx->mfc_fasync) {
672 u32 free_elements, tagstatus;
675 /* no need for spu_acquire in interrupt context */
676 free_elements = ctx->ops->get_mfc_free_elements(ctx);
677 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
680 if (free_elements & 0xffff)
682 if (tagstatus & ctx->tagwait)
685 kill_fasync(&ctx->mfc_fasync, SIGIO, mask);
689 static int spufs_read_mfc_tagstatus(struct spu_context *ctx, u32 *status)
691 /* See if there is one tag group is complete */
692 /* FIXME we need locking around tagwait */
693 *status = ctx->ops->read_mfc_tagstatus(ctx) & ctx->tagwait;
694 ctx->tagwait &= ~*status;
698 /* enable interrupt waiting for any tag group,
699 may silently fail if interrupts are already enabled */
700 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 1);
704 static ssize_t spufs_mfc_read(struct file *file, char __user *buffer,
705 size_t size, loff_t *pos)
707 struct spu_context *ctx = file->private_data;
715 if (file->f_flags & O_NONBLOCK) {
716 status = ctx->ops->read_mfc_tagstatus(ctx);
717 if (!(status & ctx->tagwait))
720 ctx->tagwait &= ~status;
722 ret = spufs_wait(ctx->mfc_wq,
723 spufs_read_mfc_tagstatus(ctx, &status));
731 if (copy_to_user(buffer, &status, 4))
738 static int spufs_check_valid_dma(struct mfc_dma_command *cmd)
740 pr_debug("queueing DMA %x %lx %x %x %x\n", cmd->lsa,
741 cmd->ea, cmd->size, cmd->tag, cmd->cmd);
752 pr_debug("invalid DMA opcode %x\n", cmd->cmd);
756 if ((cmd->lsa & 0xf) != (cmd->ea &0xf)) {
757 pr_debug("invalid DMA alignment, ea %lx lsa %x\n",
762 switch (cmd->size & 0xf) {
783 pr_debug("invalid DMA alignment %x for size %x\n",
784 cmd->lsa & 0xf, cmd->size);
788 if (cmd->size > 16 * 1024) {
789 pr_debug("invalid DMA size %x\n", cmd->size);
793 if (cmd->tag & 0xfff0) {
794 /* we reserve the higher tag numbers for kernel use */
795 pr_debug("invalid DMA tag\n");
800 /* not supported in this version */
801 pr_debug("invalid DMA class\n");
808 static int spu_send_mfc_command(struct spu_context *ctx,
809 struct mfc_dma_command cmd,
812 *error = ctx->ops->send_mfc_command(ctx, &cmd);
813 if (*error == -EAGAIN) {
814 /* wait for any tag group to complete
815 so we have space for the new command */
816 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 1);
817 /* try again, because the queue might be
819 *error = ctx->ops->send_mfc_command(ctx, &cmd);
820 if (*error == -EAGAIN)
826 static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
827 size_t size, loff_t *pos)
829 struct spu_context *ctx = file->private_data;
830 struct mfc_dma_command cmd;
833 if (size != sizeof cmd)
837 if (copy_from_user(&cmd, buffer, sizeof cmd))
840 ret = spufs_check_valid_dma(&cmd);
844 spu_acquire_runnable(ctx);
845 if (file->f_flags & O_NONBLOCK) {
846 ret = ctx->ops->send_mfc_command(ctx, &cmd);
849 ret = spufs_wait(ctx->mfc_wq,
850 spu_send_mfc_command(ctx, cmd, &status));
859 ctx->tagwait |= 1 << cmd.tag;
865 static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
867 struct spu_context *ctx = file->private_data;
868 u32 free_elements, tagstatus;
872 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
873 free_elements = ctx->ops->get_mfc_free_elements(ctx);
874 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
877 poll_wait(file, &ctx->mfc_wq, wait);
880 if (free_elements & 0xffff)
881 mask |= POLLOUT | POLLWRNORM;
882 if (tagstatus & ctx->tagwait)
883 mask |= POLLIN | POLLRDNORM;
885 pr_debug("%s: free %d tagstatus %d tagwait %d\n", __FUNCTION__,
886 free_elements, tagstatus, ctx->tagwait);
891 static int spufs_mfc_flush(struct file *file)
893 struct spu_context *ctx = file->private_data;
898 /* this currently hangs */
899 ret = spufs_wait(ctx->mfc_wq,
900 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2));
903 ret = spufs_wait(ctx->mfc_wq,
904 ctx->ops->read_mfc_tagstatus(ctx) == ctx->tagwait);
914 static int spufs_mfc_fsync(struct file *file, struct dentry *dentry,
917 return spufs_mfc_flush(file);
920 static int spufs_mfc_fasync(int fd, struct file *file, int on)
922 struct spu_context *ctx = file->private_data;
924 return fasync_helper(fd, file, on, &ctx->mfc_fasync);
927 static struct file_operations spufs_mfc_fops = {
928 .open = spufs_mfc_open,
929 .read = spufs_mfc_read,
930 .write = spufs_mfc_write,
931 .poll = spufs_mfc_poll,
932 .flush = spufs_mfc_flush,
933 .fsync = spufs_mfc_fsync,
934 .fasync = spufs_mfc_fasync,
937 static void spufs_npc_set(void *data, u64 val)
939 struct spu_context *ctx = data;
941 ctx->ops->npc_write(ctx, val);
945 static u64 spufs_npc_get(void *data)
947 struct spu_context *ctx = data;
950 ret = ctx->ops->npc_read(ctx);
954 DEFINE_SIMPLE_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set, "%llx\n")
956 static void spufs_decr_set(void *data, u64 val)
958 struct spu_context *ctx = data;
959 struct spu_lscsa *lscsa = ctx->csa.lscsa;
960 spu_acquire_saved(ctx);
961 lscsa->decr.slot[0] = (u32) val;
965 static u64 spufs_decr_get(void *data)
967 struct spu_context *ctx = data;
968 struct spu_lscsa *lscsa = ctx->csa.lscsa;
970 spu_acquire_saved(ctx);
971 ret = lscsa->decr.slot[0];
975 DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
978 static void spufs_decr_status_set(void *data, u64 val)
980 struct spu_context *ctx = data;
981 struct spu_lscsa *lscsa = ctx->csa.lscsa;
982 spu_acquire_saved(ctx);
983 lscsa->decr_status.slot[0] = (u32) val;
987 static u64 spufs_decr_status_get(void *data)
989 struct spu_context *ctx = data;
990 struct spu_lscsa *lscsa = ctx->csa.lscsa;
992 spu_acquire_saved(ctx);
993 ret = lscsa->decr_status.slot[0];
997 DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get,
998 spufs_decr_status_set, "%llx\n")
1000 static void spufs_spu_tag_mask_set(void *data, u64 val)
1002 struct spu_context *ctx = data;
1003 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1004 spu_acquire_saved(ctx);
1005 lscsa->tag_mask.slot[0] = (u32) val;
1009 static u64 spufs_spu_tag_mask_get(void *data)
1011 struct spu_context *ctx = data;
1012 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1014 spu_acquire_saved(ctx);
1015 ret = lscsa->tag_mask.slot[0];
1019 DEFINE_SIMPLE_ATTRIBUTE(spufs_spu_tag_mask_ops, spufs_spu_tag_mask_get,
1020 spufs_spu_tag_mask_set, "%llx\n")
1022 static void spufs_event_mask_set(void *data, u64 val)
1024 struct spu_context *ctx = data;
1025 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1026 spu_acquire_saved(ctx);
1027 lscsa->event_mask.slot[0] = (u32) val;
1031 static u64 spufs_event_mask_get(void *data)
1033 struct spu_context *ctx = data;
1034 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1036 spu_acquire_saved(ctx);
1037 ret = lscsa->event_mask.slot[0];
1041 DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get,
1042 spufs_event_mask_set, "%llx\n")
1044 static void spufs_srr0_set(void *data, u64 val)
1046 struct spu_context *ctx = data;
1047 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1048 spu_acquire_saved(ctx);
1049 lscsa->srr0.slot[0] = (u32) val;
1053 static u64 spufs_srr0_get(void *data)
1055 struct spu_context *ctx = data;
1056 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1058 spu_acquire_saved(ctx);
1059 ret = lscsa->srr0.slot[0];
1063 DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set,
1066 struct tree_descr spufs_dir_contents[] = {
1067 { "mem", &spufs_mem_fops, 0666, },
1068 { "regs", &spufs_regs_fops, 0666, },
1069 { "mbox", &spufs_mbox_fops, 0444, },
1070 { "ibox", &spufs_ibox_fops, 0444, },
1071 { "wbox", &spufs_wbox_fops, 0222, },
1072 { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
1073 { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
1074 { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
1075 { "signal1", &spufs_signal1_fops, 0666, },
1076 { "signal2", &spufs_signal2_fops, 0666, },
1077 { "signal1_type", &spufs_signal1_type, 0666, },
1078 { "signal2_type", &spufs_signal2_type, 0666, },
1079 { "mfc", &spufs_mfc_fops, 0666, },
1080 { "npc", &spufs_npc_ops, 0666, },
1081 { "fpcr", &spufs_fpcr_fops, 0666, },
1082 { "decr", &spufs_decr_ops, 0666, },
1083 { "decr_status", &spufs_decr_status_ops, 0666, },
1084 { "spu_tag_mask", &spufs_spu_tag_mask_ops, 0666, },
1085 { "event_mask", &spufs_event_mask_ops, 0666, },
1086 { "srr0", &spufs_srr0_ops, 0666, },