xref: /openbmc/linux/arch/powerpc/include/asm/syscalls.h (revision cc47ad409ba9cc950e9c492c8ba653dabd392148)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b8b572e1SStephen Rothwell #ifndef __ASM_POWERPC_SYSCALLS_H
3b8b572e1SStephen Rothwell #define __ASM_POWERPC_SYSCALLS_H
4b8b572e1SStephen Rothwell #ifdef __KERNEL__
5b8b572e1SStephen Rothwell 
6b8b572e1SStephen Rothwell #include <linux/compiler.h>
7b8b572e1SStephen Rothwell #include <linux/linkage.h>
8b8b572e1SStephen Rothwell #include <linux/types.h>
9*cc47ad40SCédric Le Goater #include <linux/compat.h>
10b8b572e1SStephen Rothwell 
11b8b572e1SStephen Rothwell struct rtas_args;
12b8b572e1SStephen Rothwell 
139c355917SBalbir Singh asmlinkage long sys_mmap(unsigned long addr, size_t len,
14b8b572e1SStephen Rothwell 		unsigned long prot, unsigned long flags,
15b8b572e1SStephen Rothwell 		unsigned long fd, off_t offset);
169c355917SBalbir Singh asmlinkage long sys_mmap2(unsigned long addr, size_t len,
17b8b572e1SStephen Rothwell 		unsigned long prot, unsigned long flags,
18b8b572e1SStephen Rothwell 		unsigned long fd, unsigned long pgoff);
19b8b572e1SStephen Rothwell asmlinkage long ppc64_personality(unsigned long personality);
204c392e65SAl Viro asmlinkage long sys_rtas(struct rtas_args __user *uargs);
21b8b572e1SStephen Rothwell 
22*cc47ad40SCédric Le Goater #ifdef CONFIG_COMPAT
23*cc47ad40SCédric Le Goater unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
24*cc47ad40SCédric Le Goater 			       unsigned long prot, unsigned long flags,
25*cc47ad40SCédric Le Goater 			       unsigned long fd, unsigned long pgoff);
26*cc47ad40SCédric Le Goater 
27*cc47ad40SCédric Le Goater compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
28*cc47ad40SCédric Le Goater 				  u32 reg6, u32 pos1, u32 pos2);
29*cc47ad40SCédric Le Goater 
30*cc47ad40SCédric Le Goater compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count,
31*cc47ad40SCédric Le Goater 				   u32 reg6, u32 pos1, u32 pos2);
32*cc47ad40SCédric Le Goater 
33*cc47ad40SCédric Le Goater compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32 count);
34*cc47ad40SCédric Le Goater 
35*cc47ad40SCédric Le Goater int compat_sys_truncate64(const char __user *path, u32 reg4,
36*cc47ad40SCédric Le Goater 			  unsigned long len1, unsigned long len2);
37*cc47ad40SCédric Le Goater 
38*cc47ad40SCédric Le Goater long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2, u32 len1, u32 len2);
39*cc47ad40SCédric Le Goater 
40*cc47ad40SCédric Le Goater int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
41*cc47ad40SCédric Le Goater 			   unsigned long len2);
42*cc47ad40SCédric Le Goater 
43*cc47ad40SCédric Le Goater long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
44*cc47ad40SCédric Le Goater 		     size_t len, int advice);
45*cc47ad40SCédric Le Goater 
46*cc47ad40SCédric Le Goater long compat_sys_sync_file_range2(int fd, unsigned int flags,
47*cc47ad40SCédric Le Goater 				 unsigned int offset1, unsigned int offset2,
48*cc47ad40SCédric Le Goater 				 unsigned int nbytes1, unsigned int nbytes2);
49*cc47ad40SCédric Le Goater #endif
50*cc47ad40SCédric Le Goater 
51b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
52b8b572e1SStephen Rothwell #endif /* __ASM_POWERPC_SYSCALLS_H */
53