aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/include/asm/syscalls.h
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-06-25 17:04:17 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-07-06 13:41:51 -0400
commit0707ad30d10110aebc01a5a64fb63f4b32d20b73 (patch)
tree64d8ba73e605ac26e56808d1d77701b3f83cf8b2 /arch/tile/include/asm/syscalls.h
parentc78095bd8c77fca2619769ff8efb639fd100e373 (diff)
arch/tile: Miscellaneous cleanup changes.
This commit is primarily changes caused by reviewing "sparse" and "checkpatch" output on our sources, so is somewhat noisy, since things like "printk() -> pr_err()" (or whatever) throughout the codebase tend to get tedious to read. Rather than trying to tease apart precisely which things changed due to which type of code review, this commit includes various cleanups in the code: - sparse: Add declarations in headers for globals. - sparse: Fix __user annotations. - sparse: Using gfp_t consistently instead of int. - sparse: removing functions not actually used. - checkpatch: Clean up printk() warnings by using pr_info(), etc.; also avoid partial-line printks except in bootup code. - checkpatch: Use exposed structs rather than typedefs. - checkpatch: Change some C99 comments to C89 comments. In addition, a couple of minor other changes are rolled in to this commit: - Add support for a "raise" instruction to cause SIGFPE, etc., to be raised. - Remove some compat code that is unnecessary when we fully eliminate some of the deprecated syscalls from the generic syscall ABI. - Update the tile_defconfig to reflect current config contents. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/tile/include/asm/syscalls.h')
-rw-r--r--arch/tile/include/asm/syscalls.h72
1 files changed, 70 insertions, 2 deletions
diff --git a/arch/tile/include/asm/syscalls.h b/arch/tile/include/asm/syscalls.h
index 9f2b8e2f69d..af165a74537 100644
--- a/arch/tile/include/asm/syscalls.h
+++ b/arch/tile/include/asm/syscalls.h
@@ -22,7 +22,19 @@
22#include <linux/linkage.h> 22#include <linux/linkage.h>
23#include <linux/signal.h> 23#include <linux/signal.h>
24#include <linux/types.h> 24#include <linux/types.h>
25#include <asm-generic/syscalls.h> 25#include <linux/compat.h>
26
27/* The array of function pointers for syscalls. */
28extern void *sys_call_table[];
29#ifdef CONFIG_COMPAT
30extern void *compat_sys_call_table[];
31#endif
32
33/*
34 * Note that by convention, any syscall which requires the current
35 * register set takes an additional "struct pt_regs *" pointer; the
36 * sys_xxx() function just adds the pointer and tail-calls to _sys_xxx().
37 */
26 38
27/* kernel/sys.c */ 39/* kernel/sys.c */
28ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count); 40ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count);
@@ -31,10 +43,66 @@ long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi,
31int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, 43int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi,
32 u32 len_lo, u32 len_hi, int advice); 44 u32 len_lo, u32 len_hi, int advice);
33long sys_flush_cache(void); 45long sys_flush_cache(void);
46long sys_mmap2(unsigned long addr, unsigned long len,
47 unsigned long prot, unsigned long flags,
48 unsigned long fd, unsigned long pgoff);
49#ifdef __tilegx__
50long sys_mmap(unsigned long addr, unsigned long len,
51 unsigned long prot, unsigned long flags,
52 unsigned long fd, off_t pgoff);
53#endif
54
55/* kernel/process.c */
56long sys_clone(unsigned long clone_flags, unsigned long newsp,
57 void __user *parent_tid, void __user *child_tid);
58long _sys_clone(unsigned long clone_flags, unsigned long newsp,
59 void __user *parent_tid, void __user *child_tid,
60 struct pt_regs *regs);
61long sys_fork(void);
62long _sys_fork(struct pt_regs *regs);
63long sys_vfork(void);
64long _sys_vfork(struct pt_regs *regs);
65long sys_execve(char __user *filename, char __user * __user *argv,
66 char __user * __user *envp);
67long _sys_execve(char __user *filename, char __user * __user *argv,
68 char __user * __user *envp, struct pt_regs *regs);
69
70/* kernel/signal.c */
71long sys_sigaltstack(const stack_t __user *, stack_t __user *);
72long _sys_sigaltstack(const stack_t __user *, stack_t __user *,
73 struct pt_regs *);
74long sys_rt_sigreturn(void);
75long _sys_rt_sigreturn(struct pt_regs *regs);
76
77/* platform-independent functions */
78long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize);
79long sys_rt_sigaction(int sig, const struct sigaction __user *act,
80 struct sigaction __user *oact, size_t sigsetsize);
34 81
35#ifndef __tilegx__ 82#ifndef __tilegx__
36/* mm/fault.c */ 83/* mm/fault.c */
37int sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); 84int sys_cmpxchg_badaddr(unsigned long address);
85int _sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *);
86#endif
87
88#ifdef CONFIG_COMPAT
89long compat_sys_execve(char __user *path, compat_uptr_t __user *argv,
90 compat_uptr_t __user *envp);
91long _compat_sys_execve(char __user *path, compat_uptr_t __user *argv,
92 compat_uptr_t __user *envp, struct pt_regs *regs);
93long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr,
94 struct compat_sigaltstack __user *uoss_ptr);
95long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr,
96 struct compat_sigaltstack __user *uoss_ptr,
97 struct pt_regs *regs);
98long compat_sys_rt_sigreturn(void);
99long _compat_sys_rt_sigreturn(struct pt_regs *regs);
100
101/* These four are not defined for 64-bit, but serve as "compat" syscalls. */
102long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg);
103long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
104long sys_truncate64(const char __user *path, loff_t length);
105long sys_ftruncate64(unsigned int fd, loff_t length);
38#endif 106#endif
39 107
40#endif /* _ASM_TILE_SYSCALLS_H */ 108#endif /* _ASM_TILE_SYSCALLS_H */