From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E26FC10F16 for ; Mon, 6 May 2024 15:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KHrvUyvF7Wi/h1hnlPUjbNR8b6zNxOppBuFz1LUb4gQ=; b=V+cLNHqOFFK4n9 oL6DVbN7skB5dgONkwvbVdTAPDs8CyoE7vLprEVWaPYvT12yXWhXrAMGgok7qnhADSKy0aMePZMC7 TTawlROYV9OieQZR+1mjG27bMdOZq9EiACQ1qG2Kwvktgkx2aBMbEYk0u6n2CvkFVyL5G7dyPFS1W 0ocp7sZvU0y4ZFKRv/g7Sf2/UOlidH8/iND9vB3LruTzfa7sl4rqMRuNsCbZozpdNncrPzoPNX+hU 2TetxGnIuTKicADItZLqo4Xj4vJ2fAKi7fZm2wspBEQ3nU0Uye7r4fyfqjsGXbd0Ux+ycQz0YGJEG 91wwQK/Rh0e+j7HE61Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s40dc-00000007wDp-2Cr5; Mon, 06 May 2024 15:52:24 +0000 Received: from out0-209.mail.aliyun.com ([140.205.0.209]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s40dR-00000007w3r-1A8X for linux-riscv@lists.infradead.org; Mon, 06 May 2024 15:52:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1715010730; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=V5hA+ZyI44gZD58G2AfJieyG2gwT3Fy83Cv7WPpLrX0=; b=eHjTCGVIJ5K2jtTKlEcHdBAFNFJJHPhjkH8z5FrhbtooFlLnm/IjPaYkW7UnDDyUaM7WUiyPZGEuNTeTV5UQu/TdQJjfQbMKe+hDLBbjJyiczXRW5YVCxDLBzmOuUxXIwMbBK3pVaq9tzTT0cBb1lSuUZMwhljaFihUIcKYz9D0= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047202;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---.XTd3Clf_1715010725; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XTd3Clf_1715010725) by smtp.aliyun-inc.com; Mon, 06 May 2024 23:52:06 +0800 From: "Bang Li" To: akpm@linux-foundation.org, chenhuacai@kernel.org, tsbogend@alpha.franken.de, paul.walmsley@sifive.com, palmer@dabbelt.com, chris@zankel.net, jcmvbkbc@gmail.com Cc: , , , , , , , , "Bang Li" Subject: [PATCH v2 3/5] riscv: Add update_mmu_tlb_range() Date: Mon, 06 May 2024 23:51:18 +0800 Message-Id: <20240506155120.83105-4-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20240506155120.83105-1-libang.li@antgroup.com> References: <20240506155120.83105-1-libang.li@antgroup.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_085213_678250_1C22E60E X-CRM114-Status: UNSURE ( 5.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Added update_mmu_tlb_range function, we can batch update tlb of an address range. Signed-off-by: Bang Li --- arch/riscv/include/asm/pgtable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 661b2b4fe758..f784c6dd2c66 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -489,6 +489,10 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf, #define __HAVE_ARCH_UPDATE_MMU_TLB #define update_mmu_tlb update_mmu_cache +#define __HAVE_ARCH_UPDATE_MMU_TLB_RANGE +#define update_mmu_tlb_range(vma, addr, ptep, nr) \ + update_mmu_cache_range(NULL, vma, addr, ptep, nr) + static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp) { -- 2.19.1.6.gb485710b _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out0-214.mail.aliyun.com (out0-214.mail.aliyun.com [140.205.0.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65E72156220 for ; Mon, 6 May 2024 16:22:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.214 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715012581; cv=none; b=MSIGCS4Tq9l3A12TSoZy/eLdDljllWzQkX7PHtyB/1xqBoVz1GUAGy4DT2PpbHuIigzVF2j2xEW7bA8KL0H2UbzYTdEPsebW5oe78tkXrsdOhAvaDntup0M9YykOEIXixk3qxpMYx8jNjN4zdCnwJN8524E9vCXvTw0CoqxENGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715012581; c=relaxed/simple; bh=9Yh85VzIOU/V0hUFMa4Ncpa3uq6U/PD5BfSD0II4KQo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f4KW5bKe5yb4N/uA0I4VkQKpvg/k0SJ8KaB3xWzhxQbUThK09WdWBBqzRx4Cns4IpOrVd+DwtmcrjqO3PHaCi5UDiu+oAe9PR4OrjHO56TDfaxa5vN40j5Tjq8ZiuvvajRIByvip03NOwzJufUUSFVoaxTzd/sUFsOij6a9T7B4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=03Z25AFH; arc=none smtp.client-ip=140.205.0.214 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="03Z25AFH" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1715012575; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=V5hA+ZyI44gZD58G2AfJieyG2gwT3Fy83Cv7WPpLrX0=; b=03Z25AFHdVHJMQMDkoD25JasGdYCjC4kTjfhEvJ42tO75zvwlZZ9TP61ykoJv/F/NpSvFtL4YAgHmR/j9gXNvsceQyFBkuj/VmAzIT0/vgG1VmofmPdCX8Q1igHhOxNnK4DdvR6c+ZKnktCy9/QGSY4mZnbrRIw/JjeIhTtZccA= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047202;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---.XTd3Clf_1715010725; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XTd3Clf_1715010725) by smtp.aliyun-inc.com; Mon, 06 May 2024 23:52:06 +0800 From: "Bang Li" To: akpm@linux-foundation.org, chenhuacai@kernel.org, tsbogend@alpha.franken.de, paul.walmsley@sifive.com, palmer@dabbelt.com, chris@zankel.net, jcmvbkbc@gmail.com Cc: , , , , , , , , "Bang Li" Subject: [PATCH v2 3/5] riscv: Add update_mmu_tlb_range() Date: Mon, 06 May 2024 23:51:18 +0800 Message-Id: <20240506155120.83105-4-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20240506155120.83105-1-libang.li@antgroup.com> References: <20240506155120.83105-1-libang.li@antgroup.com> Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Added update_mmu_tlb_range function, we can batch update tlb of an address range. Signed-off-by: Bang Li --- arch/riscv/include/asm/pgtable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 661b2b4fe758..f784c6dd2c66 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -489,6 +489,10 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf, #define __HAVE_ARCH_UPDATE_MMU_TLB #define update_mmu_tlb update_mmu_cache +#define __HAVE_ARCH_UPDATE_MMU_TLB_RANGE +#define update_mmu_tlb_range(vma, addr, ptep, nr) \ + update_mmu_cache_range(NULL, vma, addr, ptep, nr) + static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp) { -- 2.19.1.6.gb485710b