[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a7b22e7cf2c22933774a93bb5d8ca5de9a27ac37.1694093327.git.geert@linux-m68k.org>
Date: Thu, 7 Sep 2023 15:41:05 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: linux-m68k@...ts.linux-m68k.org
Cc: Arnd Bergmann <arnd@...db.de>, Finn Thain <fthain@...ux-m68k.org>,
Michael Schmitz <schmitzmic@...il.com>,
Philip Blundell <philb@....org>,
Greg Ungerer <gerg@...ux-m68k.org>,
Joshua Thompson <funaho@...ai.org>,
Sam Creasey <sammy@...my.net>,
Laurent Vivier <laurent@...ier.eu>,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 04/52] m68k: kernel: Add and use <asm/syscalls.h>
When building with W=1:
arch/m68k/kernel/sys_m68k.c:40:17: warning: no previous prototype for ‘sys_mmap2’ [-Wmissing-prototypes]
40 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
| ^~~~~~~~~
arch/m68k/kernel/sys_m68k.c:378:1: warning: no previous prototype for ‘sys_cacheflush’ [-Wmissing-prototypes]
378 | sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
| ^~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:463:1: warning: no previous prototype for ‘sys_atomic_cmpxchg_32’ [-Wmissing-prototypes]
463 | sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,
| ^~~~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:564:16: warning: no previous prototype for ‘sys_getpagesize’ [-Wmissing-prototypes]
564 | asmlinkage int sys_getpagesize(void)
| ^~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:569:26: warning: no previous prototype for ‘sys_get_thread_area’ [-Wmissing-prototypes]
569 | asmlinkage unsigned long sys_get_thread_area(void)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:574:16: warning: no previous prototype for ‘sys_set_thread_area’ [-Wmissing-prototypes]
574 | asmlinkage int sys_set_thread_area(unsigned long tp)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:580:16: warning: no previous prototype for ‘sys_atomic_barrier’ [-Wmissing-prototypes]
580 | asmlinkage int sys_atomic_barrier(void)
| ^~~~~~~~~~~~~~~~~~
Fix this by introducing a new header file <asm/syscalls.h> for holding
the prototypes for m68k-specific syscalls, and including the generic
ones.
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
arch/m68k/include/asm/syscalls.h | 20 ++++++++++++++++++++
arch/m68k/kernel/sys_m68k.c | 1 +
2 files changed, 21 insertions(+)
create mode 100644 arch/m68k/include/asm/syscalls.h
diff --git a/arch/m68k/include/asm/syscalls.h b/arch/m68k/include/asm/syscalls.h
new file mode 100644
index 0000000000000000..6d814ffa2560105d
--- /dev/null
+++ b/arch/m68k/include/asm/syscalls.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _ASM_M68K_SYSCALLS_H
+#define _ASM_M68K_SYSCALLS_H
+
+#include <linux/compiler_types.h>
+#include <linux/linkage.h>
+
+asmlinkage int sys_cacheflush(unsigned long addr, int scope, int cache,
+ unsigned long len);
+asmlinkage int sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3,
+ int d4, int d5, unsigned long __user *mem);
+asmlinkage int sys_getpagesize(void);
+asmlinkage unsigned long sys_get_thread_area(void);
+asmlinkage int sys_set_thread_area(unsigned long tp);
+asmlinkage int sys_atomic_barrier(void);
+
+#include <asm-generic/syscalls.h>
+
+#endif /* _ASM_M68K_SYSCALLS_H */
+
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index c586034d2a7ac85d..14055d676161d725 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -27,6 +27,7 @@
#include <asm/cachectl.h>
#include <asm/traps.h>
#include <asm/page.h>
+#include <asm/syscalls.h>
#include <asm/unistd.h>
#include <asm/cacheflush.h>
--
2.34.1
Powered by blists - more mailing lists