Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: add asm/syscalls.h header

System call prototypes are generally in linux/syscalls.h, but there are a
couple of mips specific entry points that are missing there:

arch/mips/kernel/signal.c:636:17: error: no previous prototype for 'sys_sigreturn' [-Werror=missing-prototypes]
arch/mips/kernel/signal.c:673:17: error: no previous prototype for 'sys_rt_sigreturn' [-Werror=missing-prototypes]
arch/mips/kernel/syscall.c:51:16: error: no previous prototype for 'sysm_pipe' [-Werror=missing-prototypes]
arch/mips/kernel/mips-mt-fpaff.c:65:17: error: no previous prototype for 'mipsmt_sys_sched_setaffinity' [-Werror=missing-prototypes]
arch/mips/kernel/mips-mt-fpaff.c:157:17: error: no previous prototype for 'mipsmt_sys_sched_getaffinity' [-Werror=missing-prototypes]

Add these to a new asm/syscalls.h as we have in other architectures.

Link: https://lkml.kernel.org/r/20231204115710.2247097-3-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Arnd Bergmann and committed by
Andrew Morton
be018aaa 1b5e6f4e

+40
+33
arch/mips/include/asm/syscalls.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + #ifndef _ASM_MIPS_SYSCALLS_H 3 + #define _ASM_MIPS_SYSCALLS_H 4 + 5 + #include <linux/linkage.h> 6 + #include <linux/compat.h> 7 + 8 + asmlinkage void sys_sigreturn(void); 9 + asmlinkage void sys_rt_sigreturn(void); 10 + asmlinkage int sysm_pipe(void); 11 + asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, 12 + unsigned long __user *user_mask_ptr); 13 + asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, 14 + unsigned long __user *user_mask_ptr); 15 + asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2, 16 + unsigned offset_a3, unsigned len_a4, 17 + unsigned len_a5); 18 + asmlinkage long sys32_fadvise64_64(int fd, int __pad, 19 + unsigned long a2, unsigned long a3, 20 + unsigned long a4, unsigned long a5, 21 + int flags); 22 + asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, 23 + size_t count); 24 + asmlinkage long sys32_sync_file_range(int fd, int __pad, 25 + unsigned long a2, unsigned long a3, 26 + unsigned long a4, unsigned long a5, 27 + int flags); 28 + asmlinkage void sys32_rt_sigreturn(void); 29 + asmlinkage void sys32_sigreturn(void); 30 + asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset); 31 + asmlinkage void sysn32_rt_sigreturn(void); 32 + 33 + #endif
+1
arch/mips/kernel/linux32.c
··· 42 42 #include <linux/uaccess.h> 43 43 #include <asm/mmu_context.h> 44 44 #include <asm/mman.h> 45 + #include <asm/syscalls.h> 45 46 46 47 #ifdef __MIPSEB__ 47 48 #define merge_64(r1, r2) ((((r1) & 0xffffffffUL) << 32) + ((r2) & 0xffffffffUL))
+1
arch/mips/kernel/mips-mt-fpaff.c
··· 15 15 #include <linux/security.h> 16 16 #include <linux/types.h> 17 17 #include <linux/uaccess.h> 18 + #include <asm/syscalls.h> 18 19 19 20 /* 20 21 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
+1
arch/mips/kernel/signal.c
··· 38 38 #include <asm/dsp.h> 39 39 #include <asm/inst.h> 40 40 #include <asm/msa.h> 41 + #include <asm/syscalls.h> 41 42 42 43 #include "signal-common.h" 43 44
+1
arch/mips/kernel/signal32.c
··· 18 18 #include <asm/compat-signal.h> 19 19 #include <linux/uaccess.h> 20 20 #include <asm/unistd.h> 21 + #include <asm/syscalls.h> 21 22 22 23 #include "signal-common.h" 23 24
+1
arch/mips/kernel/signal_n32.c
··· 24 24 #include <asm/ucontext.h> 25 25 #include <asm/fpu.h> 26 26 #include <asm/cpu-features.h> 27 + #include <asm/syscalls.h> 27 28 28 29 #include "signal-common.h" 29 30
+1
arch/mips/kernel/signal_o32.c
··· 19 19 #include <asm/dsp.h> 20 20 #include <asm/sim.h> 21 21 #include <asm/unistd.h> 22 + #include <asm/syscalls.h> 22 23 23 24 #include "signal-common.h" 24 25
+1
arch/mips/kernel/syscall.c
··· 39 39 #include <asm/shmparam.h> 40 40 #include <asm/sync.h> 41 41 #include <asm/sysmips.h> 42 + #include <asm/syscalls.h> 42 43 #include <asm/switch_to.h> 43 44 44 45 /*