GNU Linux-libre 5.15.72-gnu
[releases.git] / arch / powerpc / include / asm / syscalls.h
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
22 #ifdef CONFIG_COMPAT
23 unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
24                                unsigned long prot, unsigned long flags,
25                                unsigned long fd, unsigned long pgoff);
26
27 compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
28                                   u32 reg6, u32 pos1, u32 pos2);
29
30 compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count,
31                                    u32 reg6, u32 pos1, u32 pos2);
32
33 compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32 count);
34
35 int compat_sys_truncate64(const char __user *path, u32 reg4,
36                           unsigned long len1, unsigned long len2);
37
38 long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2, u32 len1, u32 len2);
39
40 int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
41                            unsigned long len2);
42
43 long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
44                      size_t len, int advice);
45
46 long compat_sys_sync_file_range2(int fd, unsigned int flags,
47                                  unsigned int offset1, unsigned int offset2,
48                                  unsigned int nbytes1, unsigned int nbytes2);
49 #endif
50
51 #endif /* __KERNEL__ */
52 #endif /* __ASM_POWERPC_SYSCALLS_H */