xref: /linux/arch/powerpc/include/asm/syscalls.h (revision da1d9caf95def6f0320819cf941c9fd1069ba9e1)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_POWERPC_SYSCALLS_H
3 #define __ASM_POWERPC_SYSCALLS_H
4 #ifdef __KERNEL__
5 
6 #include <linux/compiler.h>
7 #include <linux/linkage.h>
8 #include <linux/types.h>
9 #include <linux/compat.h>
10 
11 struct rtas_args;
12 
13 asmlinkage long sys_mmap(unsigned long addr, size_t len,
14 		unsigned long prot, unsigned long flags,
15 		unsigned long fd, off_t offset);
16 asmlinkage long sys_mmap2(unsigned long addr, size_t len,
17 		unsigned long prot, unsigned long flags,
18 		unsigned long fd, unsigned long pgoff);
19 asmlinkage long ppc64_personality(unsigned long personality);
20 asmlinkage long sys_rtas(struct rtas_args __user *uargs);
21 int ppc_select(int n, fd_set __user *inp, fd_set __user *outp,
22 	       fd_set __user *exp, struct __kernel_old_timeval __user *tvp);
23 long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
24 		      u32 len_high, u32 len_low);
25 
26 #ifdef CONFIG_COMPAT
27 unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
28 			       unsigned long prot, unsigned long flags,
29 			       unsigned long fd, unsigned long pgoff);
30 
31 compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
32 				  u32 reg6, u32 pos1, u32 pos2);
33 
34 compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count,
35 				   u32 reg6, u32 pos1, u32 pos2);
36 
37 compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32 count);
38 
39 int compat_sys_truncate64(const char __user *path, u32 reg4,
40 			  unsigned long len1, unsigned long len2);
41 
42 long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2, u32 len1, u32 len2);
43 
44 int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
45 			   unsigned long len2);
46 
47 long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
48 		     size_t len, int advice);
49 
50 long compat_sys_sync_file_range2(int fd, unsigned int flags,
51 				 unsigned int offset1, unsigned int offset2,
52 				 unsigned int nbytes1, unsigned int nbytes2);
53 #endif
54 
55 #endif /* __KERNEL__ */
56 #endif /* __ASM_POWERPC_SYSCALLS_H */
57