diff options
Diffstat (limited to 'arch/tile/kernel/sys.c')
-rw-r--r-- | arch/tile/kernel/sys.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/tile/kernel/sys.c b/arch/tile/kernel/sys.c index 0427978cea0a..f0f87eab8c39 100644 --- a/arch/tile/kernel/sys.c +++ b/arch/tile/kernel/sys.c | |||
@@ -27,11 +27,10 @@ | |||
27 | #include <linux/mempolicy.h> | 27 | #include <linux/mempolicy.h> |
28 | #include <linux/binfmts.h> | 28 | #include <linux/binfmts.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/syscalls.h> | 30 | #include <linux/compat.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/signal.h> | 32 | #include <linux/signal.h> |
33 | #include <asm/syscalls.h> | 33 | #include <asm/syscalls.h> |
34 | |||
35 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
36 | #include <asm/homecache.h> | 35 | #include <asm/homecache.h> |
37 | #include <arch/chip.h> | 36 | #include <arch/chip.h> |
@@ -74,10 +73,7 @@ int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, | |||
74 | 73 | ||
75 | #endif /* 32-bit syscall wrappers */ | 74 | #endif /* 32-bit syscall wrappers */ |
76 | 75 | ||
77 | /* | 76 | /* Note: used by the compat code even in 64-bit Linux. */ |
78 | * This API uses a 4KB-page-count offset into the file descriptor. | ||
79 | * It is likely not the right API to use on a 64-bit platform. | ||
80 | */ | ||
81 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, | 77 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, |
82 | unsigned long, prot, unsigned long, flags, | 78 | unsigned long, prot, unsigned long, flags, |
83 | unsigned long, fd, unsigned long, off_4k) | 79 | unsigned long, fd, unsigned long, off_4k) |
@@ -89,10 +85,7 @@ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, | |||
89 | off_4k >> PAGE_ADJUST); | 85 | off_4k >> PAGE_ADJUST); |
90 | } | 86 | } |
91 | 87 | ||
92 | /* | 88 | #ifdef __tilegx__ |
93 | * This API uses a byte offset into the file descriptor. | ||
94 | * It is likely not the right API to use on a 32-bit platform. | ||
95 | */ | ||
96 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | 89 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, |
97 | unsigned long, prot, unsigned long, flags, | 90 | unsigned long, prot, unsigned long, flags, |
98 | unsigned long, fd, off_t, offset) | 91 | unsigned long, fd, off_t, offset) |
@@ -102,6 +95,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
102 | return sys_mmap_pgoff(addr, len, prot, flags, fd, | 95 | return sys_mmap_pgoff(addr, len, prot, flags, fd, |
103 | offset >> PAGE_SHIFT); | 96 | offset >> PAGE_SHIFT); |
104 | } | 97 | } |
98 | #endif | ||
105 | 99 | ||
106 | 100 | ||
107 | /* Provide the actual syscall number to call mapping. */ | 101 | /* Provide the actual syscall number to call mapping. */ |
@@ -116,6 +110,10 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
116 | #define sys_sync_file_range sys_sync_file_range2 | 110 | #define sys_sync_file_range sys_sync_file_range2 |
117 | #endif | 111 | #endif |
118 | 112 | ||
113 | /* | ||
114 | * Note that we can't include <linux/unistd.h> here since the header | ||
115 | * guard will defeat us; <asm/unistd.h> checks for __SYSCALL as well. | ||
116 | */ | ||
119 | void *sys_call_table[__NR_syscalls] = { | 117 | void *sys_call_table[__NR_syscalls] = { |
120 | [0 ... __NR_syscalls-1] = sys_ni_syscall, | 118 | [0 ... __NR_syscalls-1] = sys_ni_syscall, |
121 | #include <asm/unistd.h> | 119 | #include <asm/unistd.h> |