Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2651261rdb; Mon, 4 Dec 2023 03:58:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1NbzWpuKQcnLnGCAErpg1kOtlyFsBYVyiC9cLiIW4IlMXGcWg1UWp8Y4iQKiGnYwiKqnh X-Received: by 2002:a62:8454:0:b0:6ce:2e39:97d5 with SMTP id k81-20020a628454000000b006ce2e3997d5mr4532779pfd.38.1701691105813; Mon, 04 Dec 2023 03:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701691105; cv=none; d=google.com; s=arc-20160816; b=rbDwTB55RqwQoWAiihthjtFWBWTy082K9+Op+hsSItj8to4wm16IsqksMhxXfj2N81 N3XPR4/PLzOzv3/CY2cbukUuT5H9dsE7vZL/iomkl6CqxLesVW0mFEB+sxeFzg6lRW2H Cnp/23dZr6fQUSuDmUIh9zv8sQqpDGn2JhpX23eFDv81lfT6tilNMLHG897UM1inOMZh 8KU90UGHg3dCaE8dp9YlX+GpjqlhswbaKVGJV4awqvPBGHRuMy1wWuS/w+cb5hv6RgCa 2OcX0MpJ7itt5BJig3jbfODfg5zOjSH1zbF4EYPTC8FngaG9SG0QKzrjlsOaPwxNfKMo CvVg== 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 :dkim-signature; bh=CSUTRoWxcbyeOYMNVDk/OQILFK/vfPEXfFbOPZHdg08=; fh=ZaUu8Qu87y0sWtsc/L1xWJKMgHMvIjP9DS2ujBqzc8w=; b=lU2p/afqw9G4bw6OSO8iVHlsvXK4e02suYZUexfjF23XDGtAd/ApGr+mIhu4Cn4bzN yKLbpVvRkLYerN/6HmlynjCDuSK8ooA0Alx3WD4w1eKxcD+av+nwWu7fLD9ECISP49J+ lNqwMicpOoTf/nU5fhgcJ1GxzJAODYdaxugSPuK8N3Nv4NHkPRquV6CjO/l51vIfdR9A gs7PaB0/PTRL3JtvH+wOEvgR7ECMJLqrR0pBSKwnDXndDbYlsC554qGYaIMq/TivTELu IfhZ236BA9Di9lrfZXq20nmC2ZyenVhDiApo2o9IIGJtHVCQilbzXrlBXlDDJHqQpjp4 VY4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J5WjEPhO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a13-20020a65604d000000b005c60319034bsi8055699pgp.481.2023.12.04.03.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 03:58:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J5WjEPhO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AA6748094D48; Mon, 4 Dec 2023 03:58:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233193AbjLDL5u (ORCPT + 99 others); Mon, 4 Dec 2023 06:57:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231348AbjLDL50 (ORCPT ); Mon, 4 Dec 2023 06:57:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 077BE10CC for ; Mon, 4 Dec 2023 03:57:25 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0AC6C433C8; Mon, 4 Dec 2023 11:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691045; bh=GVPJo8uO9T+V60ClpxXsIQariQDInjL+tl05cbLyqws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5WjEPhOrZxIpNezsV3u/mxLcK7Hlo3/HZCu5+pDjyw6ptaF74uL9RVDwGkDMVor0 IBgGfGNu43qo+2Nz5Nwe6S3pJ6eGqcEp6wfpH2lQPcnfl7dWDkNEmFh5sMQo8LdBe4 /cNu7OXGtEXqtM5WTAQSy8Ae45cUF+QVK3dKvuA8d5nOL1zx3r6dJRowDoXqMJnIV/ aHUWTkM7i+MBIrm/vc4oxH7L0qg33oNbbRXYlgtLRh7be7tAAsEa42v95fyTk8R/Gl f8RXvSy68dKBpvArRPQbhCllvCazfanqRt1cELSmlpKwd5/8fw4iksMGd4lt50xo5i QiFCJ8zOsQUfQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 03/20] mips: add missing declarations for trap handlers Date: Mon, 4 Dec 2023 12:56:53 +0100 Message-Id: <20231204115710.2247097-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Mon, 04 Dec 2023 03:58:22 -0800 (PST) From: Arnd Bergmann These exception handlers are all called from assembly code, so they don't normally need a declaration, but without one we now get warnings: arch/mips/mm/fault.c:323:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:447:17: error: no previous prototype for 'do_be' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:752:17: error: no previous prototype for 'do_ov' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:874:17: error: no previous prototype for 'do_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1027:17: error: no previous prototype for 'do_bp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1114:17: error: no previous prototype for 'do_tr' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1151:17: error: no previous prototype for 'do_ri' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1402:17: error: no previous prototype for 'do_cpu' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1507:17: error: no previous prototype for 'do_msa_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1527:17: error: no previous prototype for 'do_msa' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1548:17: error: no previous prototype for 'do_mdmx' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1560:17: error: no previous prototype for 'do_watch' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1587:17: error: no previous prototype for 'do_mcheck' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1612:17: error: no previous prototype for 'do_mt' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1648:17: error: no previous prototype for 'do_dsp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1656:17: error: no previous prototype for 'do_reserved' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1832:17: error: no previous prototype for 'cache_parity_error' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1880:17: error: no previous prototype for 'do_ftlb' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1909:17: error: no previous prototype for 'do_gsexc' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1944:6: error: no previous prototype for 'ejtag_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1989:17: error: no previous prototype for 'nmi_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/unaligned.c:1516:17: error: no previous prototype for 'do_ade' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/traps.h | 23 +++++++++++++++++++++++ arch/mips/kernel/r4k-bugs64.c | 1 + arch/mips/kernel/unaligned.c | 1 + arch/mips/mm/fault.c | 1 + 4 files changed, 26 insertions(+) diff --git a/arch/mips/include/asm/traps.h b/arch/mips/include/asm/traps.h index d4d9f8a8fdea..1e63d7d04404 100644 --- a/arch/mips/include/asm/traps.h +++ b/arch/mips/include/asm/traps.h @@ -41,5 +41,28 @@ extern char except_vec_nmi[]; asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, unsigned long address); +asmlinkage void do_ade(struct pt_regs *regs); +asmlinkage void do_be(struct pt_regs *regs); +asmlinkage void do_ov(struct pt_regs *regs); +asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31); +asmlinkage void do_bp(struct pt_regs *regs); +asmlinkage void do_tr(struct pt_regs *regs); +asmlinkage void do_ri(struct pt_regs *regs); +asmlinkage void do_cpu(struct pt_regs *regs); +asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr); +asmlinkage void do_msa(struct pt_regs *regs); +asmlinkage void do_mdmx(struct pt_regs *regs); +asmlinkage void do_watch(struct pt_regs *regs); +asmlinkage void do_mcheck(struct pt_regs *regs); +asmlinkage void do_mt(struct pt_regs *regs); +asmlinkage void do_dsp(struct pt_regs *regs); +asmlinkage void do_reserved(struct pt_regs *regs); +asmlinkage void do_ftlb(void); +asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1); +asmlinkage void do_daddi_ov(struct pt_regs *regs); + +asmlinkage void cache_parity_error(void); +asmlinkage void ejtag_exception_handler(struct pt_regs *regs); +asmlinkage void __noreturn nmi_exception_handler(struct pt_regs *regs); #endif /* _ASM_TRAPS_H */ diff --git a/arch/mips/kernel/r4k-bugs64.c b/arch/mips/kernel/r4k-bugs64.c index 6ffefb2c6971..1e300330078d 100644 --- a/arch/mips/kernel/r4k-bugs64.c +++ b/arch/mips/kernel/r4k-bugs64.c @@ -14,6 +14,7 @@ #include #include #include +#include static char bug64hit[] __initdata = "reliable operation impossible!\n%s"; diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index f4cf94e92ec3..db652c99b72e 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c @@ -91,6 +91,7 @@ #include #include #include +#include #include #include "access-helper.h" diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index d7878208bd3f..aaa9a242ebba 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -26,6 +26,7 @@ #include #include #include /* For VMALLOC_END */ +#include #include int show_unhandled_signals = 1; -- 2.39.2