From patchwork Sun Jan 24 05:02:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12042075 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED 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 C0D2FC433E9 for ; Sun, 24 Jan 2021 05:02:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 70DF222CA1 for ; Sun, 24 Jan 2021 05:02:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70DF222CA1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 14F8F6B0007; Sun, 24 Jan 2021 00:02:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 10A9D6B0027; Sun, 24 Jan 2021 00:02:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 014B96B0028; Sun, 24 Jan 2021 00:02:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id DFD2E6B0007 for ; Sun, 24 Jan 2021 00:02:10 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AC2C9181AF5C2 for ; Sun, 24 Jan 2021 05:02:10 +0000 (UTC) X-FDA: 77739472020.24.tub90_470ae432757a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 95D621A4A0 for ; Sun, 24 Jan 2021 05:02:10 +0000 (UTC) X-HE-Tag: tub90_470ae432757a X-Filterd-Recvd-Size: 2694 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Sun, 24 Jan 2021 05:02:10 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id CE88422D3E; Sun, 24 Jan 2021 05:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1611464529; bh=5m6eKIrU3O/9S7JR8opysQYB7ve/fwDQzJXKsoXT4q4=; h=Date:From:To:Subject:In-Reply-To:From; b=IL5yFNEBgszUsIogAzsPzynt7ECC1kgFa5KcHXYVSHG5hhphlQoYblsx32WoNzTRd e5W2ry7E9W96q0LyZ2ctT1koCa3FA5mKinVNmFNK9WgCMUJ4H4JpwUvzNdJ+HdTGr4 Pvdez8QPkYLOZdf9dxonNtRePqnftiWyowbfMUvA= Date: Sat, 23 Jan 2021 21:02:07 -0800 From: Andrew Morton To: akpm@linux-foundation.org, andreas@gaisler.com, davem@davemloft.net, linux-mm@kvack.org, mm-commits@vger.kernel.org, mpe@ellerman.id.au, paul@crapouillou.net, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, tsbogend@alpha.franken.de Subject: [patch 16/19] mips/mm/highmem: use set_pte() for kmap_local() Message-ID: <20210124050207.kzNYUeyrW%akpm@linux-foundation.org> In-Reply-To: <20210123210029.a7c704d0cab204683e41ad10@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Thomas Gleixner Subject: mips/mm/highmem: use set_pte() for kmap_local() set_pte_at() on MIPS invokes update_cache() which might recurse into kmap_local(). Use set_pte() like the original MIPS highmem implementation did. Link: https://lkml.kernel.org/r/20210112170411.187513575@linutronix.de Fixes: a4c33e83bca1 ("mips/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner Reported-by: Paul Cercueil Reported-by: Thomas Bogendoerfer Acked-by: Thomas Bogendoerfer Cc: Andreas Larsson Cc: "David S. Miller" Cc: Michael Ellerman Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- arch/mips/include/asm/highmem.h | 1 + 1 file changed, 1 insertion(+) --- a/arch/mips/include/asm/highmem.h~mips-mm-highmem-use-set_pte-for-kmap_local +++ a/arch/mips/include/asm/highmem.h @@ -51,6 +51,7 @@ extern void kmap_flush_tlb(unsigned long #define flush_cache_kmaps() BUG_ON(cpu_has_dc_aliases) +#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) set_pte(ptep, ptev) #define arch_kmap_local_post_map(vaddr, pteval) local_flush_tlb_one(vaddr) #define arch_kmap_local_post_unmap(vaddr) local_flush_tlb_one(vaddr)