From nobody Mon Dec 15 23:31:34 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15BCEEDEC59 for ; Wed, 13 Sep 2023 14:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241319AbjIMOJE (ORCPT ); Wed, 13 Sep 2023 10:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241242AbjIMOIz (ORCPT ); Wed, 13 Sep 2023 10:08:55 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A57401BCC for ; Wed, 13 Sep 2023 07:08:50 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:f674:9611:cd05:f25a]) by andre.telenet-ops.be with bizsmtp id lS8m2A00K3fvA4V01S8mWh; Wed, 13 Sep 2023 16:08:48 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qgQXd-003crA-AN; Wed, 13 Sep 2023 16:08:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qgQXu-00FV3f-L0; Wed, 13 Sep 2023 16:08:46 +0200 From: Geert Uytterhoeven To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann , Finn Thain , Michael Schmitz , Philip Blundell , Greg Ungerer , Joshua Thompson , Sam Creasey , Laurent Vivier , linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 04/52] m68k: kernel: Add and use Date: Wed, 13 Sep 2023 16:07:54 +0200 Message-Id: <80b721eeb499562cd5d49887b0eee10dd172c88d.1694613528.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with W=3D1: arch/m68k/kernel/sys_m68k.c:40:17: warning: no previous prototype for = =E2=80=98sys_mmap2=E2=80=99 [-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 = =E2=80=98sys_cacheflush=E2=80=99 [-Wmissing-prototypes] 378 | sys_cacheflush (unsigned long addr, int scope, int cache, unsig= ned long len) | ^~~~~~~~~~~~~~ arch/m68k/kernel/sys_m68k.c:463:1: warning: no previous prototype for = =E2=80=98sys_atomic_cmpxchg_32=E2=80=99 [-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 = =E2=80=98sys_getpagesize=E2=80=99 [-Wmissing-prototypes] 564 | asmlinkage int sys_getpagesize(void) | ^~~~~~~~~~~~~~~ arch/m68k/kernel/sys_m68k.c:569:26: warning: no previous prototype for = =E2=80=98sys_get_thread_area=E2=80=99 [-Wmissing-prototypes] 569 | asmlinkage unsigned long sys_get_thread_area(void) | ^~~~~~~~~~~~~~~~~~~ arch/m68k/kernel/sys_m68k.c:574:16: warning: no previous prototype for = =E2=80=98sys_set_thread_area=E2=80=99 [-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 = =E2=80=98sys_atomic_barrier=E2=80=99 [-Wmissing-prototypes] 580 | asmlinkage int sys_atomic_barrier(void) | ^~~~~~~~~~~~~~~~~~ Fix this by introducing a new header file for holding the prototypes for m68k-specific syscalls, and including the generic ones. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- v2: - Add Acked-by. --- 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/sysca= lls.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 +#include + +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 + +#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 #include #include +#include #include #include =20 --=20 2.34.1