aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/sys_bfin.c33
-rw-r--r--arch/blackfin/mach-common/entry.S2
2 files changed, 1 insertions, 34 deletions
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index afcef129d4e8..2e7f8e10bf87 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -22,39 +22,6 @@
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <asm/dma.h> 23#include <asm/dma.h>
24 24
25/* common code for old and new mmaps */
26static inline long
27do_mmap2(unsigned long addr, unsigned long len,
28 unsigned long prot, unsigned long flags,
29 unsigned long fd, unsigned long pgoff)
30{
31 int error = -EBADF;
32 struct file *file = NULL;
33
34 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
35 if (!(flags & MAP_ANONYMOUS)) {
36 file = fget(fd);
37 if (!file)
38 goto out;
39 }
40
41 down_write(&current->mm->mmap_sem);
42 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
43 up_write(&current->mm->mmap_sem);
44
45 if (file)
46 fput(file);
47 out:
48 return error;
49}
50
51asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
52 unsigned long prot, unsigned long flags,
53 unsigned long fd, unsigned long pgoff)
54{
55 return do_mmap2(addr, len, prot, flags, fd, pgoff);
56}
57
58asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags) 25asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags)
59{ 26{
60 return sram_alloc_with_lsl(size, flags); 27 return sram_alloc_with_lsl(size, flags);
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index a50637a8b9bd..f3f8bb46b517 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -1422,7 +1422,7 @@ ENTRY(_sys_call_table)
1422 .long _sys_ni_syscall /* streams2 */ 1422 .long _sys_ni_syscall /* streams2 */
1423 .long _sys_vfork /* 190 */ 1423 .long _sys_vfork /* 190 */
1424 .long _sys_getrlimit 1424 .long _sys_getrlimit
1425 .long _sys_mmap2 1425 .long _sys_mmap_pgoff
1426 .long _sys_truncate64 1426 .long _sys_truncate64
1427 .long _sys_ftruncate64 1427 .long _sys_ftruncate64
1428 .long _sys_stat64 /* 195 */ 1428 .long _sys_stat64 /* 195 */