diff options
author | Arnd Bergmann <arnd@arndb.de> | 2005-12-05 22:52:22 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:52:45 -0500 |
commit | d88cfffac0002c56c1a7a813cb885fa6b5fdcd0e (patch) | |
tree | 13e4e65d3275a275913b14b12b49dbe987789334 /arch/powerpc/platforms/cell/spufs/file.c | |
parent | 39c73c332c8264c0a3a1ce58aa3eae52d17af025 (diff) |
[PATCH] spufs: fix local store page refcounting
With the new rules for reserved pages, the spufs now
needs working page reference counting.
I should probably look into converting to vm_insert_page,
but for now this patch makes spufs work again.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/file.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 786fdb1a1cc..0fe1feccc02 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/ioctl.h> | 24 | #include <linux/ioctl.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/pagemap.h> | ||
26 | #include <linux/poll.h> | 27 | #include <linux/poll.h> |
27 | 28 | ||
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
@@ -106,6 +107,7 @@ spufs_mem_mmap_nopage(struct vm_area_struct *vma, | |||
106 | if (type) | 107 | if (type) |
107 | *type = VM_FAULT_MINOR; | 108 | *type = VM_FAULT_MINOR; |
108 | 109 | ||
110 | page_cache_get(page); | ||
109 | return page; | 111 | return page; |
110 | } | 112 | } |
111 | 113 | ||
@@ -120,7 +122,6 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) | |||
120 | return -EINVAL; | 122 | return -EINVAL; |
121 | 123 | ||
122 | /* FIXME: */ | 124 | /* FIXME: */ |
123 | vma->vm_flags |= VM_RESERVED; | ||
124 | vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) | 125 | vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) |
125 | | _PAGE_NO_CACHE); | 126 | | _PAGE_NO_CACHE); |
126 | 127 | ||