From patchwork Wed Sep 13 14:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 139019 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:a8d:b0:3f2:4152:657d with SMTP id gr13csp6656vqb; Wed, 13 Sep 2023 11:34:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH011m9HNR5Dwv9LQBIIBdxzPmrRf1QtDE91lxoJnGnZG4X9eVgg8bEaqbFd3qLJse2GWJJ X-Received: by 2002:a05:6808:1303:b0:3a8:4dfd:4f14 with SMTP id y3-20020a056808130300b003a84dfd4f14mr4256995oiv.27.1694630091747; Wed, 13 Sep 2023 11:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694630091; cv=none; d=google.com; s=arc-20160816; b=bse3gH+Ce6bjKMhZLRBQoVLR5q/pGJXobOPy2eGeoqxa4baOi5ZYYxb7QCgzxLgBJf rA93qC/l3UxbSlyXmbLNM1gHqZsUB0FiTo3ZcqnHjnSLI2nhrFXpi3oatbOSQ4a16/HD rp5G8sz3/CamgEy1Uq0vcL096mV0enNEJvO2Ulia54PGEfFYh47KOKr5MM2CXT2gCie+ f2k3wKgMeusX98In7+6c3fmEq0xEOsuJNuItsICxHpvuVX+ZVClHViK7x0/oAIeLUxsB bZtfnBGXPjmPd0LQxQAKxFrBiFwLDyKp4Ch/Y9eW7nHWmUWUi/08eePE3URTRKZxPhEc QR9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KU/V+LlkguPaR+5sgHqH8OchS6VUHgfqKoOSNHkM6BU=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=cknUYJq5s007VfVLL6hzE9OjLP6/nuPx7OQeISoe6l2thtEVEfuBbEMSfNSgWezvBh yyr5noD2Dzpe5m3CQ0xIFply6ipx1/L+52A/ypTCjGiisdJsWDk0IYizhGGZjYlgzKAG RWzvKyIxKnXpOcXzreAJivNL39X6vXCJmKjGlJUh6RKG35yTLF11WK6XUaB0ZZoHqKuW vBG06jH38gNnOskEmDtUbtcShKowSQQkwFxPnfPnu8mDdlaOkP/cvlSVYXXOZLSVjptX ZJbSefB+kNBqe+UurU+MgLnT8d5knEhVNMoDDTswil10Xuy4z29wcHWWUOb7MMRtsWIi naUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b75-20020a63344e000000b0057767db4334si6818519pga.218.2023.09.13.11.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 11:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9423083B009D; Wed, 13 Sep 2023 07:09:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241317AbjIMOJD (ORCPT + 36 others); Wed, 13 Sep 2023 10:09:03 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Sep 2023 07:09:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776948443042703053 X-GMAIL-MSGID: 1776948443042703053 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 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/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 +#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