From patchwork Mon Apr 29 10:33:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bang Li X-Patchwork-Id: 13646588 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8FE4C4345F for ; Mon, 29 Apr 2024 10:36:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA8226B0085; Mon, 29 Apr 2024 06:36:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E55D96B0087; Mon, 29 Apr 2024 06:36:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCF636B0088; Mon, 29 Apr 2024 06:36:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A83A36B0085 for ; Mon, 29 Apr 2024 06:36:00 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4B2AE1C20B0 for ; Mon, 29 Apr 2024 10:36:00 +0000 (UTC) X-FDA: 82062214080.13.5A94019 Received: from out0-220.mail.aliyun.com (out0-220.mail.aliyun.com [140.205.0.220]) by imf14.hostedemail.com (Postfix) with ESMTP id 30C05100009 for ; Mon, 29 Apr 2024 10:35:57 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=antgroup.com header.s=default header.b=o5mE9Ja5; spf=pass (imf14.hostedemail.com: domain of libang.li@antgroup.com designates 140.205.0.220 as permitted sender) smtp.mailfrom=libang.li@antgroup.com; dmarc=pass (policy=quarantine) header.from=antgroup.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714386958; 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=Zpq+IlpQptIiF+1qadAYLdyILX4yq5vgiQqk5YenteU=; b=q3Ck6LWwa8UpugI88pljHU6kunP+KxG569beL/xeUw5op90X8fye/DayMJFkHJPoxsCW1s bDQnxoKs1xU7r3UYM9TF5kGDxFC/yb7UlafTwj+8xxo3McXHFsNJKJaCf8RvlSuK5TR0Tq kMlAfx2PSaz32/F9buDHPk0G9ux3djM= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=antgroup.com header.s=default header.b=o5mE9Ja5; spf=pass (imf14.hostedemail.com: domain of libang.li@antgroup.com designates 140.205.0.220 as permitted sender) smtp.mailfrom=libang.li@antgroup.com; dmarc=pass (policy=quarantine) header.from=antgroup.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714386958; a=rsa-sha256; cv=none; b=UG4ZjE+Duc9Ua4Op23HWzwgRohmZEoJqGBmsvRGf9ecpn2wOYnEC76XjI+aGzah1TVbd+q vqIY9H+ikcB/Xk8aEkajJWXaTI4pwASLbS/v6Er71Vew0rzZFi69UT/6xmzC/8196JpMf4 JAwRTRHbtfc68xOggVFdqn8cwcuiyzY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1714386955; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Zpq+IlpQptIiF+1qadAYLdyILX4yq5vgiQqk5YenteU=; b=o5mE9Ja5J3pN0Bi+4o5rFp/KlRDFTPRc2br4GicCbAnaBGcavythIG3HPOGXZvB43DFDesx1sU6A22DQzpfGHj7MCunO1DWh7hlqO425wBInVf1kCaumJVPQvByUqLXQjUobhWlSojlM4rcr3luE1NuYa7uO+t0Rx/9zAa5adgE= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047205;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.XOFQRPj_1714386953; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XOFQRPj_1714386953) by smtp.aliyun-inc.com; Mon, 29 Apr 2024 18:35:54 +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 v1 2/5] mips: Add update_mmu_tlb_range() Date: Mon, 29 Apr 2024 18:33:43 +0800 Message-Id: <20240429103346.59115-3-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 X-Stat-Signature: rpox4dumwgrkkesac3p4q8qjmhs59cfp X-Rspam-User: X-Rspamd-Queue-Id: 30C05100009 X-Rspamd-Server: rspam05 X-HE-Tag: 1714386957-342278 X-HE-Meta: U2FsdGVkX18YDeSKm1mWtyzlLMb05AsyIJPSONmKau97z8uct9CX75nC2kUdiqtZxSBuy8nUxPDEAMpayrxwVzytVF7uAI4u9HCKXjbR5MDX/5lkNza5CEzmGbxTpcgyF20bctqmsetE85I4Wjlddq34rN/foq8GguQxG6+mHUtQWOdD7QN4AO2O7NUcrpJ794jvjf9xh1y4k8K/XPb3KLKYywiogXQW92lT2MtzeO5ka+pU9OAY7awbGXeZ35pUZa7eB6fH9YVrHXt+olhppTuOm5cWB84wD1q2VoEsvroEcws2IrdtT0cem+PTd3qrNF21YmsT7qHZyhA3WFDyk/uSiFk6s3r7aWAOgcfrMJrtp6ITosnGlT9dqjsmVsJ+6PGA8oIOmM0cCxYOCox16RVf0+9NkStB1FWz7PClMfqmf4mEDdKH2kpSy3algx/sgG3b1bOGYcaJ8JZtyJ8RhwrfpgBfYUXHfUhHDIURG12TnWTYM25Xyf3jrGOcqAlNskFZpXr3jVXzN0uiw6ZkQbDOlPu2SVH+3HijpNQ9iOUywANlCVeDmFOeJstIutk0ZUX4gACL1oOH4Rvn2OxTDiyQiKsbEoEybTOmnx8EJOn5u3z30BcruVR53CVUQN6i7Oxp7IzfBQobo/Sb0/sEeNTvdGeaatEK/XREH2dIj5tnsIqYrtNdnsHIZqT2HaVU6YWAKhnevM8IDVngMNNSrdSo7rQBlzQ7Csbx47avwYdzvpoTyWue5H+8CurfU7AuvwMMX3QpOlirW1GuRBUU4FCsmd2XiDaFaF8YxoUG1KtNayy+CglPD7RKFS5eTfzPfnH3kFcpYn9i1Yxu3S+oXU6rRrSdmHoVOiBh/Rv2uM2hCTfrpEVsWhQwm0azdwmzo7OKu8PZw/80SbC/C4rcct4ngsNtI2ypUITI3m4oG02tF5y9k27G8CXpzRChCTC905up9HNqCV+7XabByRA 0OC8BOj3 Oa0boY4XrFWSqsSmt4mhbxZi0v5uzlQrtLZ4d4V03NYxqO7jiTeFsjhKpWRozXZ/V6CG5UV9poucg+yZRoyRsc/nAPqzsTXPpb3n/fR/+DlphzaFCBQBFOlrsiFBIr7vmAZQ/jooZz2DKTo15BSG1FPUYyHxSIYGMq1PuYA3T2hHL3DPDZ9y3BEzcmEYEniLa3Tjbr6hHgIGHccsrNbXy7F1aspcMWUui0JedDakypyGfTPZiaCTi45nURiCLPNoFOk7Xx2MriyXnr3U9PcfB7hE/gFuia4RBzMpAy38ENKLfDC4vI0MnJU76bI5T/97GQgz/eXqgZ6r0bEe1Tofm5lqwK+EOEVg5JwYX/UjsIBeh78otwmfURSbMcg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000449, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Added update_mmu_tlb_range function, we can batch update tlb of an address range. Signed-off-by: Bang Li --- arch/mips/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index e27a4c83c548..0891ad7d43b6 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -596,6 +596,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, address, ptep, nr) \ + update_mmu_cache_range(NULL, vma, address, ptep, nr) static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp)