Message ID | 20240429103346.59115-4-libang.li@antgroup.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 262F6C4345F for <linux-mm@archiver.kernel.org>; Mon, 29 Apr 2024 10:36:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E5FE6B0088; Mon, 29 Apr 2024 06:36:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 295C86B0089; Mon, 29 Apr 2024 06:36:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1106D6B008A; Mon, 29 Apr 2024 06:36:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E2D8C6B0088 for <linux-mm@kvack.org>; Mon, 29 Apr 2024 06:36:01 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A0239140F7A for <linux-mm@kvack.org>; Mon, 29 Apr 2024 10:36:01 +0000 (UTC) X-FDA: 82062214122.07.84F4C68 Received: from out0-215.mail.aliyun.com (out0-215.mail.aliyun.com [140.205.0.215]) by imf13.hostedemail.com (Postfix) with ESMTP id 6EAA32001B for <linux-mm@kvack.org>; Mon, 29 Apr 2024 10:35:59 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=antgroup.com header.s=default header.b=ibFPlMLI; dmarc=pass (policy=quarantine) header.from=antgroup.com; spf=pass (imf13.hostedemail.com: domain of libang.li@antgroup.com designates 140.205.0.215 as permitted sender) smtp.mailfrom=libang.li@antgroup.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714386959; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Wijyh1yP2Yf03/VPvTBn+/oZ8/jA626iTOgm2E3/T4s=; b=OQT6ooQm5sOWxf+5AFp5EQhIpiznDNBF4wpzKa/Uj/0b1FQ+V8fnRfUfFEGfl8WbFbuNGg PlZ6UdjC6m4IKfdbGnP2WVW3Y1+FcNhuXTNUKbRFgyCEuZPO0H1pbbETKW+GCfD7TVEJU2 kMRlT0swU8n1hQQKVKCvCGN54vttZew= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=antgroup.com header.s=default header.b=ibFPlMLI; dmarc=pass (policy=quarantine) header.from=antgroup.com; spf=pass (imf13.hostedemail.com: domain of libang.li@antgroup.com designates 140.205.0.215 as permitted sender) smtp.mailfrom=libang.li@antgroup.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714386959; a=rsa-sha256; cv=none; b=vUom93NhJXDzX/+qyGSaqpeQxD6JiBCEwdVwb880U6fn7rulJajyLqXoNb2YQnksttq1Se YS3ljutTCJHHTlwwzsMgE7kEBz6tewResm0MliQ0Jb/gyx9V78clZ3rIWL+SvkiepQvZfb jE6IzXF3F7ylGxdeuefszG62uFkugsU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1714386956; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Wijyh1yP2Yf03/VPvTBn+/oZ8/jA626iTOgm2E3/T4s=; b=ibFPlMLIxO/WKit3I9vkg1+KEIajyOp6Xtr/aCqXjx1q/6k6jMkiQAc80fRe47229yKc1xdMm9t4dPvWFifVWMCEnEtTVKVb4WlA/iRUjsuYyJLHaTL3YrlaNMPQyzK+nlz1gbNR0bK63DPc+ORxfLpBn0fuDhuglt/2BZTWo80= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047193;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.XOFQRQ6_1714386955; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XOFQRQ6_1714386955) by smtp.aliyun-inc.com; Mon, 29 Apr 2024 18:35:55 +0800 From: "Bang Li" <libang.li@antgroup.com> 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: <david@redhat.com>, <ryan.roberts@arm.com>, <libang.linux@gmail.com>, <ioworker0@gmail.com>, <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, <loongarch@lists.linux.dev>, <linux-mips@vger.kernel.org>, <linux-riscv@lists.infradead.org>, "Bang Li" <libang.li@antgroup.com> Subject: [PATCH v1 3/5] riscv: Add update_mmu_tlb_range() Date: Mon, 29 Apr 2024 18:33:44 +0800 Message-Id: <20240429103346.59115-4-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20240429103346.59115-1-libang.li@antgroup.com> References: <20240429103346.59115-1-libang.li@antgroup.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam01 X-Stat-Signature: xr3gyikzcgza3op8r5tdemizrg8wrfd3 X-Rspam-User: X-Rspamd-Queue-Id: 6EAA32001B X-HE-Tag: 1714386959-497345 X-HE-Meta: U2FsdGVkX1+h/uWNNTj1lVFNr3GCEE+Euw/3PUXkw1asnDarOKFlKmXMi5+KSL1H2It1nAmStP1IBZX/Ob3eokI+HZVDa2pI8Ohx+VLrQ6r6D4bABBII5bP6HtlvHgjnJmFCA45+bBEsP2nyfowaxKYbEqGqnufnTQULFEI6DTnf85ohsgilhDqpHmL4zPncNV7aGapAjV0FA6CDLffFaHsXBhuEapFubw5+PHf2Y8qQXjkv7EM/d3huwULVNP6uVw3Awrli6ENdpsNwCgB8ILId2myjbAsN0FHGgSH3Ts+saMcu1Wp46gxBeFtWRVohokh2gjwymrprPrV1n0oPRS1Ufbl+2KpddRlpzQGqtbRhTwPZOvkPyWQOSxvS1bIx6yGn8Cey1q9x0fJLlj5dfNTvRzdgQjX3SpXyxd/CdjLOzNnffTenU4eFelGtdOuDIFPCAAZwwczX4mNu5HMmcEuiReaZH+vz3d7YK7eUrrIgBrHDsA35dPC7V+k6rgi/8do09tQlsK8yMsZed3VMTp5r3R1dAISqzxdPIEDDAVWHk9dmsMtu+GKgK/sFLbDSIbNWCno4uewmGttG3s7c4G9tFI992BIjP7d5EsMRMpsmgAHbama3A7/sNSBCTNcKImU7Qt0So92Lod1Tv5WyVOBmFdvWC5TsKqeiTHfzhAXmTYjpgR+6GxNMJx4ly43IbP1I7AhjSaKpfN/mw34fPOdHPOsk5jnNEn7XxTJ22NjM08CkAT6dbIfAEjhLdxcahHnRlW9ieM6s9nLKAplokupia3IOvhd9zVme423sWGAOx2RQrLGkWrtsIgVBPgJ3eaSdMlipUXNlQ9Tz6lthStSJEcEbdMvwYiu4U+HxEPZH2tl/1xGDMdaOcfsZEzXsKSnkxiS/z54KLAyb9d+juF7oRfFclFkf6hXOTj1PZ45stJ0mQ9S+Zv+e5sIw5TLX8pvyz1M8/ZB//eqDzmN Lxoo1cmZ oQDqmdHFA4SSle8j+M7fP+a+lQ/WlyiIBy8phR2qQSk4WrYvtvF/yHbd3sQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000022, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series | Add update_mmu_tlb_range() to simplify code | expand |
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index f2d5973a011b..d515a11a52cd 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -488,6 +488,8 @@ 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 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)
Added update_mmu_tlb_range function, we can batch update tlb of an address range. Signed-off-by: Bang Li <libang.li@antgroup.com> --- arch/riscv/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+)