public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: linux-mips@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Stephen Rothwell" <sfr@rothwell.id.au>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>
Subject: [PATCH 02/20] mips: add asm/syscalls.h header
Date: Mon,  4 Dec 2023 12:56:52 +0100	[thread overview]
Message-ID: <20231204115710.2247097-3-arnd@kernel.org> (raw)
In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/mips/include/asm/syscalls.h | 33 ++++++++++++++++++++++++++++++++
 arch/mips/kernel/linux32.c       |  1 +
 arch/mips/kernel/mips-mt-fpaff.c |  1 +
 arch/mips/kernel/signal.c        |  1 +
 arch/mips/kernel/signal32.c      |  1 +
 arch/mips/kernel/signal_n32.c    |  1 +
 arch/mips/kernel/signal_o32.c    |  1 +
 arch/mips/kernel/syscall.c       |  1 +
 8 files changed, 40 insertions(+)
 create mode 100644 arch/mips/include/asm/syscalls.h

diff --git a/arch/mips/include/asm/syscalls.h b/arch/mips/include/asm/syscalls.h
new file mode 100644
index 000000000000..59f9c0c9fa0a
--- /dev/null
+++ b/arch/mips/include/asm/syscalls.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _ASM_MIPS_SYSCALLS_H
+#define _ASM_MIPS_SYSCALLS_H
+
+#include <linux/linkage.h>
+#include <linux/compat.h>
+
+asmlinkage void sys_sigreturn(void);
+asmlinkage void sys_rt_sigreturn(void);
+asmlinkage int sysm_pipe(void);
+asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
+                                     unsigned long __user *user_mask_ptr);
+asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
+                                     unsigned long __user *user_mask_ptr);
+asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2,
+				unsigned offset_a3, unsigned len_a4,
+				unsigned len_a5);
+asmlinkage long sys32_fadvise64_64(int fd, int __pad,
+				   unsigned long a2, unsigned long a3,
+				   unsigned long a4, unsigned long a5,
+				   int flags);
+asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3,
+				   size_t count);
+asmlinkage long sys32_sync_file_range(int fd, int __pad,
+				      unsigned long a2, unsigned long a3,
+				      unsigned long a4, unsigned long a5,
+				      int flags);
+asmlinkage void sys32_rt_sigreturn(void);
+asmlinkage void sys32_sigreturn(void);
+asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset);
+asmlinkage void sysn32_rt_sigreturn(void);
+
+#endif
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 6b61be486303..a0c0a7a654e9 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -42,6 +42,7 @@
 #include <linux/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/mman.h>
+#include <asm/syscalls.h>
 
 #ifdef __MIPSEB__
 #define merge_64(r1, r2) ((((r1) & 0xffffffffUL) << 32) + ((r2) & 0xffffffffUL))
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
index 67e130d3f038..10172fc4f627 100644
--- a/arch/mips/kernel/mips-mt-fpaff.c
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -15,6 +15,7 @@
 #include <linux/security.h>
 #include <linux/types.h>
 #include <linux/uaccess.h>
+#include <asm/syscalls.h>
 
 /*
  * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 479999b7f2de..ccbf580827f6 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -38,6 +38,7 @@
 #include <asm/dsp.h>
 #include <asm/inst.h>
 #include <asm/msa.h>
+#include <asm/syscalls.h>
 
 #include "signal-common.h"
 
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 59b8965433c2..73081d4ee8c1 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -18,6 +18,7 @@
 #include <asm/compat-signal.h>
 #include <linux/uaccess.h>
 #include <asm/unistd.h>
+#include <asm/syscalls.h>
 
 #include "signal-common.h"
 
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index cfc77b69420a..ff2043d620ba 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -24,6 +24,7 @@
 #include <asm/ucontext.h>
 #include <asm/fpu.h>
 #include <asm/cpu-features.h>
+#include <asm/syscalls.h>
 
 #include "signal-common.h"
 
diff --git a/arch/mips/kernel/signal_o32.c b/arch/mips/kernel/signal_o32.c
index 299a7a28ca33..4f0458459650 100644
--- a/arch/mips/kernel/signal_o32.c
+++ b/arch/mips/kernel/signal_o32.c
@@ -19,6 +19,7 @@
 #include <asm/dsp.h>
 #include <asm/sim.h>
 #include <asm/unistd.h>
+#include <asm/syscalls.h>
 
 #include "signal-common.h"
 
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index ae93a607ddf7..1bfc34a2e5b3 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -39,6 +39,7 @@
 #include <asm/shmparam.h>
 #include <asm/sync.h>
 #include <asm/sysmips.h>
+#include <asm/syscalls.h>
 #include <asm/switch_to.h>
 
 /*
-- 
2.39.2


  parent reply	other threads:[~2023-12-04 11:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 11:56 [PATCH 00/20] mips: address -Wmissing-prototypes warnings Arnd Bergmann
2023-12-04 11:56 ` [PATCH 01/20] mips: decompress: fix add missing prototypes Arnd Bergmann
2023-12-04 11:56 ` Arnd Bergmann [this message]
2023-12-04 11:56 ` [PATCH 03/20] mips: add missing declarations for trap handlers Arnd Bergmann
2023-12-04 11:56 ` [PATCH 04/20] mips: rs870e: stop exporting local functions Arnd Bergmann
2023-12-04 11:56 ` [PATCH 05/20] mips: signal: move sigcontext declarations to header Arnd Bergmann
2023-12-04 11:56 ` [PATCH 06/20] mips: mark local function static if possible Arnd Bergmann
2023-12-04 11:56 ` [PATCH 07/20] mips: move build_tlb_refill_handler() prototype Arnd Bergmann
2023-12-04 11:56 ` [PATCH 08/20] mips: move jump_label_apply_nops() declaration to header Arnd Bergmann
2023-12-04 11:56 ` [PATCH 09/20] mips: unhide uasm_in_compat_space_p() declaration Arnd Bergmann
2023-12-04 11:57 ` [PATCH 10/20] mips: fix setup_zero_pages() prototype Arnd Bergmann
2023-12-04 11:57 ` [PATCH 11/20] mips: fix tlb_init() prototype Arnd Bergmann
2023-12-04 11:57 ` [PATCH 12/20] mips: move cache declarations into header Arnd Bergmann
2023-12-04 11:57 ` [PATCH 13/20] mips: add missing declarations Arnd Bergmann
2023-12-04 11:57 ` [PATCH 14/20] mips: spram: fix missing prototype warning for spram_config Arnd Bergmann
2023-12-04 11:57 ` [PATCH 15/20] mips: mt: include asm/mips_mt.h Arnd Bergmann
2023-12-04 11:57 ` [PATCH 16/20] mips: remove extraneous asm-generic/iomap.h include Arnd Bergmann
2023-12-04 11:57 ` [PATCH 17/20] mips: suspend: include linux/suspend.h as needed Arnd Bergmann
2023-12-04 11:57 ` [PATCH 18/20] mips: hide conditionally unused functions Arnd Bergmann
2023-12-04 11:57 ` [PATCH 19/20] mips: smp: fix setup_profiling_timer() prototype Arnd Bergmann
2023-12-04 11:57 ` [PATCH 20/20] mips: kexec: include linux/reboot.h Arnd Bergmann
2023-12-05 11:00 ` [PATCH 00/20] mips: address -Wmissing-prototypes warnings Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231204115710.2247097-3-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=sfr@rothwell.id.au \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox