From patchwork Mon Dec 4 11:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 173246 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2708303vqy; Mon, 4 Dec 2023 03:59:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZC5Xi0zs25pAQRmKDN26ydbGr4z7MtgQMZrG1opDRLfB8Fn13spzPuVzkIQnSTeB4zwSF X-Received: by 2002:a17:903:22d1:b0:1d0:83bc:564c with SMTP id y17-20020a17090322d100b001d083bc564cmr1088031plg.51.1701691165910; Mon, 04 Dec 2023 03:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701691165; cv=none; d=google.com; s=arc-20160816; b=IvhZQGiZ4w9ruYZ+AcoZIkcbvVZowyBlLJWvxzJhjiae6EJpt1IVOqRXEm80B93pjr LP3rDdFR8vRS/n+U8tN+Pdz6OcSUTRdVG01lDgpflIAjWyNQEjZE+aYztoUWZxzvjPvA YPjohCPhMLZPTyvf11cMsH7Fzg5u6mwJBzeoqQ8SjMhCOjLgjIOIDrLW4ed0Vn3bCnsO OCLrvv1lhoM61C48Lt89UE4cGwOQoCj0YrVXIbc65WnMlqn798o8a8kLxJwDUFfCJppd DVNeReqPNvh7GD/O++hVSeALoZVHBBEpPlmRTga4vHycF7GvNwQBOXQFp/iqugxv9Pom IvzA== 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=UPbNSIAnxxXESH5Aj0pyV8AqtuQ9SRjOPSngnYgO7XI=; fh=ZaUu8Qu87y0sWtsc/L1xWJKMgHMvIjP9DS2ujBqzc8w=; b=Jjb8I9Pv7YiNt5ie+ige1QlfbgYpWsnSzEEUMHuS/D0qgeDG9EN16tDNN9wakPpBGo 2oK1+8AwCiP556TKohti6/Z4GQRieyVngsX+HEXgH/LcwTAIBgXTAdu/nB0TMviqwf9b H/xspSnNwKQXRto/h4E/nLL19Vx5unnhxydJ+YIfI/bEg7ncw22M1EqagC+UmbJ9NDMq SwVirLhAX6nV2I3jJjw1HFwC2NzGHaehwjNXu8OmOBaEsLP81xwrUfqY5AuoBXw30+t/ +D1brxd+eubVpdUsbSiSPLLMpVxWWtRPB33o0iYb66wxcPeJKm189ellTcsU488N6TtZ hOjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O0qjci0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id iz9-20020a170902ef8900b001d068dfe6e5si4497552plb.31.2023.12.04.03.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 03:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O0qjci0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 575F7805D5E3; Mon, 4 Dec 2023 03:59:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234903AbjLDL67 (ORCPT + 99 others); Mon, 4 Dec 2023 06:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343803AbjLDL6T (ORCPT ); Mon, 4 Dec 2023 06:58:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B98281BC0 for ; Mon, 4 Dec 2023 03:57:41 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 726FFC43395; Mon, 4 Dec 2023 11:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691061; bh=TN+helZA3bPv2YjKOOvsbQc10ej/I0xDQI0yWDQmgfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0qjci0KWVyXGoGetwLAdxCbm3vMP8PwEkoyqEAI4sdba9umtQj+C0CjCz/+VCNHt 78dAPC0khV3FBaDdebhE5AVNwQldlJnkXvD8wa2BZ9TAkf+aHEpe9k7WZaU7z+Frsx 9ROjnLRKResu/hhZ8yh3uMJ1CexSrTKe+5vA6wbLE3SEG9eQgtfqTDfP0l5OVDLKOM bvQwa5x1yXV5P03JcUcfXAoi8Lmrc8ufouFNwfD9IY7hc104mQdi0pYkv0fRESsPLg R/REziphpRYuQNQ+t20SI/gYNxs0m/qKxr/a9mU0wGDJmMAKIeoDRF32GwZmHTNnqf w3cn2BNnu8jLQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 11/20] mips: fix tlb_init() prototype Date: Mon, 4 Dec 2023 12:57:01 +0100 Message-Id: <20231204115710.2247097-12-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 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 04 Dec 2023 03:59:23 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784352516179065965 X-GMAIL-MSGID: 1784352516179065965 From: Arnd Bergmann There are two definitions for tlb_init(), but no global declaration: arch/mips/mm/tlb-r4k.c:552:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] arch/mips/mm/tlb-r3k.c:244:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] Move the declaration to asm/setup.h and included it as needed. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/setup.h | 1 + arch/mips/kernel/traps.c | 2 -- arch/mips/mm/tlb-r3k.c | 1 + arch/mips/mm/tlb-r4k.c | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h index 8c56b862fd9c..4dce41138bad 100644 --- a/arch/mips/include/asm/setup.h +++ b/arch/mips/include/asm/setup.h @@ -27,5 +27,6 @@ extern unsigned long ebase; extern unsigned int hwrena; extern void per_cpu_trap_init(bool); extern void cpu_cache_init(void); +extern void tlb_init(void); #endif /* __SETUP_H */ diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 246c6a6b0261..c58c0c3c5b40 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2157,8 +2157,6 @@ void *set_vi_handler(int n, vi_handler_t addr) return set_vi_srs_handler(n, addr, 0); } -extern void tlb_init(void); - /* * Timer interrupt */ diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index 1fb2cf8c8bfa..f6db65410c65 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #undef DEBUG_TLB diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index a542b255019a..44411b20c7ec 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has