Commit 0891c474 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/80b721eeb499562cd5d49887b0eee10dd172c88d.1694613528.git.geert@linux-m68k.org
parent e036678a
/* 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 */
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment