diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-17 15:52:22 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-19 22:56:13 -0400 |
commit | 818d8462bb7c717706bcfe994258e2c3710d1fd0 (patch) | |
tree | d597fe6369a03fdf0b8fc0c940579cbe1efab35e | |
parent | f4de51de2edcd26ec77bfc71b1f00b1de5a5dc20 (diff) |
arch/tile: cleanups for tilegx compat mode
These changes make the syscall table line up correctly for
tilegx compat mode, and remove the stale sys32_fadvise64() function,
which isn't actually used by any syscall table.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
-rw-r--r-- | arch/tile/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/tile/kernel/compat.c | 11 | ||||
-rw-r--r-- | arch/tile/kernel/sys.c | 9 |
3 files changed, 1 insertions, 21 deletions
diff --git a/arch/tile/include/asm/unistd.h b/arch/tile/include/asm/unistd.h index b35c2db71199..f70bf1c541f1 100644 --- a/arch/tile/include/asm/unistd.h +++ b/arch/tile/include/asm/unistd.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL) | 15 | #if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL) |
16 | #define _ASM_TILE_UNISTD_H | 16 | #define _ASM_TILE_UNISTD_H |
17 | 17 | ||
18 | #ifndef __LP64__ | 18 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) |
19 | /* Use the flavor of this syscall that matches the 32-bit API better. */ | 19 | /* Use the flavor of this syscall that matches the 32-bit API better. */ |
20 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | 20 | #define __ARCH_WANT_SYNC_FILE_RANGE2 |
21 | #endif | 21 | #endif |
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c index e35a3975ca3b..bf5e9d70266c 100644 --- a/arch/tile/kernel/compat.c +++ b/arch/tile/kernel/compat.c | |||
@@ -142,19 +142,8 @@ long tile_compat_sys_msgrcv(int msqid, | |||
142 | #define compat_sys_msgsnd tile_compat_sys_msgsnd | 142 | #define compat_sys_msgsnd tile_compat_sys_msgsnd |
143 | 143 | ||
144 | /* See comments in sys.c */ | 144 | /* See comments in sys.c */ |
145 | #define compat_sys_fadvise64 sys32_fadvise64 | ||
146 | #define compat_sys_fadvise64_64 sys32_fadvise64_64 | 145 | #define compat_sys_fadvise64_64 sys32_fadvise64_64 |
147 | #define compat_sys_readahead sys32_readahead | 146 | #define compat_sys_readahead sys32_readahead |
148 | #define compat_sys_sync_file_range compat_sys_sync_file_range2 | ||
149 | |||
150 | /* We leverage the "struct stat64" type for 32-bit time_t/nsec. */ | ||
151 | #define compat_sys_stat64 sys_stat64 | ||
152 | #define compat_sys_lstat64 sys_lstat64 | ||
153 | #define compat_sys_fstat64 sys_fstat64 | ||
154 | #define compat_sys_fstatat64 sys_fstatat64 | ||
155 | |||
156 | /* The native sys_ptrace dynamically handles compat binaries. */ | ||
157 | #define compat_sys_ptrace sys_ptrace | ||
158 | 147 | ||
159 | /* Call the trampolines to manage pt_regs where necessary. */ | 148 | /* Call the trampolines to manage pt_regs where necessary. */ |
160 | #define compat_sys_execve _compat_sys_execve | 149 | #define compat_sys_execve _compat_sys_execve |
diff --git a/arch/tile/kernel/sys.c b/arch/tile/kernel/sys.c index e2187d24a9b4..cb44ba7ccd2d 100644 --- a/arch/tile/kernel/sys.c +++ b/arch/tile/kernel/sys.c | |||
@@ -56,13 +56,6 @@ ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count) | |||
56 | return sys_readahead(fd, ((loff_t)offset_hi << 32) | offset_lo, count); | 56 | return sys_readahead(fd, ((loff_t)offset_hi << 32) | offset_lo, count); |
57 | } | 57 | } |
58 | 58 | ||
59 | long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi, | ||
60 | u32 len, int advice) | ||
61 | { | ||
62 | return sys_fadvise64_64(fd, ((loff_t)offset_hi << 32) | offset_lo, | ||
63 | len, advice); | ||
64 | } | ||
65 | |||
66 | int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, | 59 | int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, |
67 | u32 len_lo, u32 len_hi, int advice) | 60 | u32 len_lo, u32 len_hi, int advice) |
68 | { | 61 | { |
@@ -103,10 +96,8 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
103 | 96 | ||
104 | #ifndef __tilegx__ | 97 | #ifndef __tilegx__ |
105 | /* See comments at the top of the file. */ | 98 | /* See comments at the top of the file. */ |
106 | #define sys_fadvise64 sys32_fadvise64 | ||
107 | #define sys_fadvise64_64 sys32_fadvise64_64 | 99 | #define sys_fadvise64_64 sys32_fadvise64_64 |
108 | #define sys_readahead sys32_readahead | 100 | #define sys_readahead sys32_readahead |
109 | #define sys_sync_file_range sys_sync_file_range2 | ||
110 | #endif | 101 | #endif |
111 | 102 | ||
112 | /* Call the trampolines to manage pt_regs where necessary. */ | 103 | /* Call the trampolines to manage pt_regs where necessary. */ |