From patchwork Wed Sep 13 14:08:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 139013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:a8d:b0:3f2:4152:657d with SMTP id gr13csp4113vqb; Wed, 13 Sep 2023 11:30:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESHzXbcVkzuxkZuQ64/mnMUmt06IU3Bzdw0cD1w4dZCRTb442N+pTPKmxBPi0+4Bu6CDAh X-Received: by 2002:aa7:8881:0:b0:68f:d4fe:6344 with SMTP id z1-20020aa78881000000b0068fd4fe6344mr4228759pfe.0.1694629818537; Wed, 13 Sep 2023 11:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694629818; cv=none; d=google.com; s=arc-20160816; b=QqzPZxm5+xiJE4Y3vhdzlrIL7oy/8Dvs6KBfUn+Si6bhoTURTfCTZt2a3KwgsIfl/X o1+AtLNp5XNzkX7U2KSdiWey5yfJe4sDy6dpvcyiffjxvUatbPJAbV9q68nH8FkjiWnn awKKCS+dHfsrftLbgpx+QhtZ3vcvPEgpY54QYba+bwBgFLUW7KpY3zyYAsbAtVPEu4JC /QBizuQDzLi84241SmaKoZukSGKYxgDRuhMmgaJ6+mnlgkyQ1cpqcUBFXGfY5KcQpkGo 4lXHPSQVb05Zc9kV31aTc4isZHnQhf9wsLuugOIF7c1qmp1Nq2jJykWanAmI35h0jJgw ihbw== 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=znDARCDOVM7WNpoH3R58I/uKck5F7wXyBfdI5X3+/qc=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=sDpiyewNHhYiNExY3ibk6qRiILo3aSzmCjBveO7WXlgmLBhuZfyIU3CkR9mOo7+la3 36TjUJ3mA2IwbE4rkoE1mGVOCAmfgMmCnzNOa7JRj3YLMh02gp7juhgFmBCb8GuEJPnv FrfbuXL7gUpsn6BE6CLzWApvJ0abTt9RIlPuu7xSdDqIRQGTJb7XahcHB5a6Icie6cIp lPJQ3PLysNmApEb37apgHNKdsQ8TSkCDROX2JZFRz5PhRX/nyetzdCCOcdP2PmHcWOtj tbAQZ0Rn9q0uU9kUROu7sgU/dC/4tvFo77qdpe53W2c17KHwiSbOCYE/D7+1e4m7imgl llog== 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 x190-20020a6386c7000000b0055b43079642si7357705pgd.120.2023.09.13.11.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 11:30:18 -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 E08BD82C516E; Wed, 13 Sep 2023 07:08:56 -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 S241297AbjIMOI6 (ORCPT + 36 others); Wed, 13 Sep 2023 10:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241234AbjIMOIz (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 710A41BC7 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 lS8n2A0023fvA4V01S8nWk; 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-003crl-Hy; Wed, 13 Sep 2023 16:08:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qgQXu-00FV4N-TL; 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 13/52] m68k: mm: Add and use "fault.h" Date: Wed, 13 Sep 2023 16:08:03 +0200 Message-Id: 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:08:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776948156857816832 X-GMAIL-MSGID: 1776948156857816832 When building with W=1: arch/m68k/mm/fault.c:22:5: warning: no previous prototype for ‘send_fault_sig’ [-Wmissing-prototypes] 22 | int send_fault_sig(struct pt_regs *regs) | ^~~~~~~~~~~~~~ arch/m68k/mm/fault.c:68:5: warning: no previous prototype for ‘do_page_fault’ [-Wmissing-prototypes] 68 | int do_page_fault(struct pt_regs *regs, unsigned long address, | ^~~~~~~~~~~~~ Fix this by introducing a new header file "fault.h" for holding the prototypes of functions implemented in arch/m68k/mm/fault.c. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- v2: - Add Acked-by. --- arch/m68k/kernel/sys_m68k.c | 3 +-- arch/m68k/kernel/traps.c | 5 +---- arch/m68k/mm/fault.c | 2 ++ arch/m68k/mm/fault.h | 7 +++++++ 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 arch/m68k/mm/fault.h diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 14055d676161d725..1af5e60824676bf3 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c @@ -35,8 +35,7 @@ #include -asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, - unsigned long error_code); +#include "../mm/fault.h" asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index d408334712f7118b..129c89349e1a40aa 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c @@ -42,6 +42,7 @@ #include #include "traps.h" +#include "../mm/fault.h" static const char *vec_names[] = { [VEC_RESETSP] = "RESET SP", @@ -126,10 +127,6 @@ static const char *space_names[] = { }; void die_if_kernel(char *,struct pt_regs *,int); -asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, - unsigned long error_code); -int send_fault_sig(struct pt_regs *regs); - asmlinkage void trap_c(struct frame *fp); #if defined (CONFIG_M68060) diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index c290c5c0cfb93a81..fa3c5f38d9894c08 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c @@ -17,6 +17,8 @@ #include #include +#include "fault.h" + extern void die_if_kernel(char *, struct pt_regs *, long); int send_fault_sig(struct pt_regs *regs) diff --git a/arch/m68k/mm/fault.h b/arch/m68k/mm/fault.h new file mode 100644 index 0000000000000000..dab14ef7d4a171d5 --- /dev/null +++ b/arch/m68k/mm/fault.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +struct pt_regs; + +int do_page_fault(struct pt_regs *regs, unsigned long address, + unsigned long error_code); +int send_fault_sig(struct pt_regs *regs);