Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1482501lqh; Mon, 6 May 2024 08:57:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTS4nLTSv02dF6lPxbivjsl/GFYkR4pNmseHfxsOTrMe4qSQRULRHH5Xjmmcy8OI/XFH8zeuirN5nE8FnqFoXCEzE8g5DbPeCykRNeGA== X-Google-Smtp-Source: AGHT+IGbLGxXAhLqlbbXAG2nPXLJ1cfT6px8cTgSlxMDG3/n26WNhP8jWXM9iGuIb70y4m2d7oxp X-Received: by 2002:a17:906:3b5a:b0:a59:e3b8:ab8a with SMTP id h26-20020a1709063b5a00b00a59e3b8ab8amr253546ejf.20.1715011079478; Mon, 06 May 2024 08:57:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715011079; cv=pass; d=google.com; s=arc-20160816; b=1C7bIt6C6IO58fvN09BauDeS9fd9PJctbxWsZJR/Scfnta9IihJWtoLUZFjvdqF+tf D+YvHoOyjYvYyhFpV50ISxbCMJMTKHNhCuPPVNNJFgLJTqTbiLpfTCwHQmRe9V/9SD8z 5Gj6vNMftN/zQiTYGV9W4XslyjV08rABT7tnhKHEsWWUZpBKBkQi7YWP8VtaY0X5aGBF fKBM0jmWhJr8Thl6XW1ymMnHoBiQBKX5uiXFL++KiF0dppunIwS02Gvms3/23iLy0rVX 8vLn2f1hT16EhplheHUyX83dIc/31hQrWeV2pMZsoh1nbvAbo0m7h975JVQ1FDqhUbnd vjtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=V5hA+ZyI44gZD58G2AfJieyG2gwT3Fy83Cv7WPpLrX0=; fh=ZaPvTvk3greVAhtlw/faBL7y/bcze5JBULOYO1tsevI=; b=R33VKOjZBaA0YWGzAVWiRV+dXk7+9s/moXto4fqmcoQt5wrf8GuFJwPpzovudeIaqY isZ/HVILSCu5KWNRqDd2mPRODIPK08HwJhXpPm/SvbvjKGGKti5KyN3/cWPHPoMpq3RZ shVZmCP2gC5Evoxj6ea8kzNC9qu3ltpzklg+cYgIftJ4top1fuezsUkCDBcNR5qGAlpb Lvkf+I+Vk3IlODURBkSqh4E6JV2abEgrwo/QWGPaZEmE07A7Plt5CNvYmcQcWBu1yYdc qK20Lfrwhrhxf4qtE6dn2HMiOBG6Z5kENMl5SjZB5UvBkOjCK8EEHjJ7MEv1h4D4Kn1C m8KA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=LWFtCWkL; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-170107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p17-20020a170906229100b00a59b4982a6asi2425237eja.142.2024.05.06.08.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 08:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=LWFtCWkL; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-170107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D4DE41F24AAD for ; Mon, 6 May 2024 15:57:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE034156221; Mon, 6 May 2024 15:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="LWFtCWkL" Received: from out0-221.mail.aliyun.com (out0-221.mail.aliyun.com [140.205.0.221]) (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 9A40B4D58E for ; Mon, 6 May 2024 15:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715011049; cv=none; b=I5ZSUwIOT2x9inCpvx6F+BD2m3JpwAblbI0QUL2HqkXrlj9hjj0YWvB2paqgbL4vIxRZZSXHE80zJgMJe5MiGm5EYsc/Ok2JTsvb6a3qr40qbXJb7CPxVLD+9amMZoyjn2LsB1ecdfiD538tHNcqTul37SjJZrvZWdB8aA3GcaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715011049; c=relaxed/simple; bh=9Yh85VzIOU/V0hUFMa4Ncpa3uq6U/PD5BfSD0II4KQo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U4+3Ixf7HgnQwEwQSrBlIGN+K7VGxMT4KMs0OrmRPQjWPd+qC6HNUo9q02TouEj9swGzcihT7VSLW1pqe+iWpvB2iMoUh5pnU39CBiFXM037tgEkgSax/Y2DP/H8Hjf9m4H3oSuYYrmDBzJblmU+Z2dnvQ5qA+nOvSkwrZOpP0U= 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=LWFtCWkL; arc=none smtp.client-ip=140.205.0.221 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 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1715011044; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=V5hA+ZyI44gZD58G2AfJieyG2gwT3Fy83Cv7WPpLrX0=; b=LWFtCWkLpTI27jN7lJilPUvZCYzaowFXsvy8WvKBNpDiyV9gzVPq4kgHP0bliu58ABopWDCG+9SizSXb81+GgvgxXHjcALqpYDpKh2v+p/zBMIAYb7wHV3L4BdsJfrktf7I636OIS2euGrOfdKrRf1Btm4AWoud5OKOx3pJtV8Y= 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: linux-kernel@vger.kernel.org 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