From patchwork Thu Jan 21 01:34:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanteng Si X-Patchwork-Id: 12034733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAB82C433DB for ; Thu, 21 Jan 2021 05:56:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 904E42389E for ; Thu, 21 Jan 2021 05:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725933AbhAUDcA (ORCPT ); Wed, 20 Jan 2021 22:32:00 -0500 Received: from mail.loongson.cn ([114.242.206.163]:52118 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387713AbhAUBgV (ORCPT ); Wed, 20 Jan 2021 20:36:21 -0500 Received: from localhost.localdomain (unknown [112.3.198.184]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxS+Qb2ghg7lgIAA--.13363S2; Thu, 21 Jan 2021 09:34:19 +0800 (CST) From: Yanteng Si To: Thomas Bogendoerfer Cc: Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org, siyanteng01@gmail.com, Yanteng Si Subject: [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Date: Thu, 21 Jan 2021 09:34:34 +0800 Message-Id: <20210121013435.450471-1-siyanteng@loongson.cn> X-Mailer: git-send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gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdb18UUU UU= X-CM-SenderInfo: pvl1t0pwhqwqxorr0wxvrqhubq/ Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This commit adds a prototype to fix error at W=1: arch/mips/mm/cache.c:129:6: error: no previous prototype for '__update_cache' [-Werror=missing-prototypes] Signed-off-by: Yanteng Si --- arch/mips/include/asm/pgtable.h | 2 +- arch/mips/mm/cache.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 4d3ab682d093..804889b70965 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -64,6 +64,7 @@ struct vm_area_struct; #define __S111 __pgprot(0) extern unsigned long _page_cachable_default; +extern void __update_cache(unsigned long address, pte_t pte); /* * ZERO_PAGE is a global shared page that is always zero; used @@ -224,7 +225,6 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) { - extern void __update_cache(unsigned long address, pte_t pte); if (!pte_present(pteval)) goto cache_sync_done; diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 23b16bfd97b2..27f4228dd24e 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -21,6 +21,7 @@ #include #include #include +#include /* Cache operations. */ void (*flush_cache_all)(void); From patchwork Thu Jan 21 01:34:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanteng Si X-Patchwork-Id: 12034323 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DB4CC4332E for ; Thu, 21 Jan 2021 03:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75D2A238D7 for ; Thu, 21 Jan 2021 03:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbhAUDfb (ORCPT ); Wed, 20 Jan 2021 22:35:31 -0500 Received: from mail.loongson.cn ([114.242.206.163]:53874 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388454AbhAUBm1 (ORCPT ); Wed, 20 Jan 2021 20:42:27 -0500 Received: from localhost.localdomain (unknown [112.3.198.184]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxS+Qb2ghg7lgIAA--.13363S3; Thu, 21 Jan 2021 09:34:20 +0800 (CST) From: Yanteng Si To: Thomas Bogendoerfer Cc: Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org, siyanteng01@gmail.com, Yanteng Si Subject: [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access Date: Thu, 21 Jan 2021 09:34:35 +0800 Message-Id: <20210121013435.450471-2-siyanteng@loongson.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210121013435.450471-1-siyanteng@loongson.cn> References: <20210121013435.450471-1-siyanteng@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9DxS+Qb2ghg7lgIAA--.13363S3 X-Coremail-Antispam: 1UD129KBjvdXoWrZr1fAr48Kr1DuFyUZF1UJrb_yoW3KFc_u3 W7ta18urZYqFsxZry7Xan3GFW0g348Wa4q9F1qqwnIvas5Ar4UAay0q34fXrsY9asFyF4f XF95Xr1rGFnrKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbhxFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM2 8EF7xvwVC2z280aVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1U M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVAFwVWkMxAIw2 8IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4l x2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrw CI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI 42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z2 80aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbXAw3UUUUU== X-CM-SenderInfo: pvl1t0pwhqwqxorr0wxvrqhubq/ Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This commit adds a prototype to fix error at W=1: arch/mips/mm/cache.c:211:12: error: no previous prototype for '__uncached_access' [-Werror=missing-prototypes] Signed-off-by: Yanteng Si --- arch/mips/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 804889b70965..76d36484a0ad 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -65,6 +65,7 @@ struct vm_area_struct; extern unsigned long _page_cachable_default; extern void __update_cache(unsigned long address, pte_t pte); +extern int __weak __uncached_access(struct file *file, unsigned long addr); /* * ZERO_PAGE is a global shared page that is always zero; used