diff options
Diffstat (limited to 'arch/tile/include/asm/syscalls.h')
-rw-r--r-- | arch/tile/include/asm/syscalls.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/arch/tile/include/asm/syscalls.h b/arch/tile/include/asm/syscalls.h new file mode 100644 index 00000000000..af165a74537 --- /dev/null +++ b/arch/tile/include/asm/syscalls.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /* | ||
2 | * syscalls.h - Linux syscall interfaces (arch-specific) | ||
3 | * | ||
4 | * Copyright (c) 2008 Jaswinder Singh Rajput | ||
5 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation, version 2. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
14 | * NON INFRINGEMENT. See the GNU General Public License for | ||
15 | * more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef _ASM_TILE_SYSCALLS_H | ||
19 | #define _ASM_TILE_SYSCALLS_H | ||
20 | |||
21 | #include <linux/compiler.h> | ||
22 | #include <linux/linkage.h> | ||
23 | #include <linux/signal.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/compat.h> | ||
26 | |||
27 | /* The array of function pointers for syscalls. */ | ||
28 | extern void *sys_call_table[]; | ||
29 | #ifdef CONFIG_COMPAT | ||
30 | extern 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 | */ | ||
38 | |||
39 | /* kernel/sys.c */ | ||
40 | ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count); | ||
41 | long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi, | ||
42 | u32 len, int advice); | ||
43 | int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, | ||
44 | u32 len_lo, u32 len_hi, int advice); | ||
45 | long sys_flush_cache(void); | ||
46 | long 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__ | ||
50 | long 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 */ | ||
56 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
57 | void __user *parent_tid, void __user *child_tid); | ||
58 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
59 | void __user *parent_tid, void __user *child_tid, | ||
60 | struct pt_regs *regs); | ||
61 | long sys_fork(void); | ||
62 | long _sys_fork(struct pt_regs *regs); | ||
63 | long sys_vfork(void); | ||
64 | long _sys_vfork(struct pt_regs *regs); | ||
65 | long sys_execve(char __user *filename, char __user * __user *argv, | ||
66 | char __user * __user *envp); | ||
67 | long _sys_execve(char __user *filename, char __user * __user *argv, | ||
68 | char __user * __user *envp, struct pt_regs *regs); | ||
69 | |||
70 | /* kernel/signal.c */ | ||
71 | long sys_sigaltstack(const stack_t __user *, stack_t __user *); | ||
72 | long _sys_sigaltstack(const stack_t __user *, stack_t __user *, | ||
73 | struct pt_regs *); | ||
74 | long sys_rt_sigreturn(void); | ||
75 | long _sys_rt_sigreturn(struct pt_regs *regs); | ||
76 | |||
77 | /* platform-independent functions */ | ||
78 | long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize); | ||
79 | long sys_rt_sigaction(int sig, const struct sigaction __user *act, | ||
80 | struct sigaction __user *oact, size_t sigsetsize); | ||
81 | |||
82 | #ifndef __tilegx__ | ||
83 | /* mm/fault.c */ | ||
84 | int sys_cmpxchg_badaddr(unsigned long address); | ||
85 | int _sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); | ||
86 | #endif | ||
87 | |||
88 | #ifdef CONFIG_COMPAT | ||
89 | long compat_sys_execve(char __user *path, compat_uptr_t __user *argv, | ||
90 | compat_uptr_t __user *envp); | ||
91 | long _compat_sys_execve(char __user *path, compat_uptr_t __user *argv, | ||
92 | compat_uptr_t __user *envp, struct pt_regs *regs); | ||
93 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | ||
94 | struct compat_sigaltstack __user *uoss_ptr); | ||
95 | long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | ||
96 | struct compat_sigaltstack __user *uoss_ptr, | ||
97 | struct pt_regs *regs); | ||
98 | long compat_sys_rt_sigreturn(void); | ||
99 | long _compat_sys_rt_sigreturn(struct pt_regs *regs); | ||
100 | |||
101 | /* These four are not defined for 64-bit, but serve as "compat" syscalls. */ | ||
102 | long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg); | ||
103 | long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); | ||
104 | long sys_truncate64(const char __user *path, loff_t length); | ||
105 | long sys_ftruncate64(unsigned int fd, loff_t length); | ||
106 | #endif | ||
107 | |||
108 | #endif /* _ASM_TILE_SYSCALLS_H */ | ||