Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1270646lqa; Mon, 29 Apr 2024 03:46:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVID+k5GR1hX4EntZnh4eGRrFGJnMHvj56R1tQZexGHwsW7emKQmIn+/CHnp8Xj3FeeiLsUi6SfqPNMbNqSqgDgHDy/M1W/9qd5lCbwmg== X-Google-Smtp-Source: AGHT+IHbSzWgqdQdr4HQpDyVceiklKos+B4J63E3MFuNAovEsX8FBzrQADpMREB9DeFfFXud6jt0 X-Received: by 2002:a17:903:234b:b0:1eb:904:dfd7 with SMTP id c11-20020a170903234b00b001eb0904dfd7mr9009478plh.2.1714387587080; Mon, 29 Apr 2024 03:46:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714387587; cv=pass; d=google.com; s=arc-20160816; b=hroeSGD5E7AdIBfgCcBT9+K9WROpC174EuhyAfKv8Xa9p5K3NGxeJjXJz/PyYLNMf/ Ntq6PwcFv+1SC3vMh57b1EyZsMylijweCLuHk4b9k84/zlivOaKB5wO+qZ5MK96lNoZy nJD90kKHEMbQFlk9cWa7x2qG4V/zA1IScZOdi4fYLIDRiI/6HsoGnw1tL8xN7pbHaMBs BehoNV9sWVv0dTUmrA4fkuoeBxDomOq3bK9CDpv493TsWaNe9gsinbPthEgJhKkZmyIO DUSeAKNFmjo2FSJZY9jp+JAw0CClv6LBhQRAVNZRUDjHG8cCpLktq5mth2SHoZqnT4Hk rMZw== 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=Wijyh1yP2Yf03/VPvTBn+/oZ8/jA626iTOgm2E3/T4s=; fh=9xlVfU6l1eaRMALSOTbrulKFFu6LW6R2I2OsjpORYlM=; b=lKi/EMsq5dvHWef0T9MH1WlwqK0sAN/X2/HgQJoRooib4zwJKgnvi8J6Vabmsq5TLP MrsCScsqL6+73IBM1Ts6abNWhnGRjTa4EuACfa1tNZbB549wmSjFJTOyWoA2WKJI/qeG NoCQ4+EX7cQGIH1zhZZ6v9Hjnp1p0Wqof2qaSeYW8daYbJhyTWpeHB2XeAM47SG+jnyY rS2n/jWIoFE/9BdJjEC+QLUksidYavT1LoxoYxoQDsxFt49IXn+PL3Dg2odsDjJ3oznB 3CdzN59zxGoQQFuKxuF578TpZGld5E9HALHNNz9K9fWW7fSzxm7uvLB8RWJJRcK7e1eu 9KvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=IeCiIMT8; 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-162071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id lm5-20020a170903298500b001e428195efasi2473651plb.453.2024.04.29.03.46.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=IeCiIMT8; 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-162071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162071-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 73DE5B22711 for ; Mon, 29 Apr 2024 10:37:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 085504D5AC; Mon, 29 Apr 2024 10:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="IeCiIMT8" Received: from out0-219.mail.aliyun.com (out0-219.mail.aliyun.com [140.205.0.219]) (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 0D86547A7D; Mon, 29 Apr 2024 10:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386967; cv=none; b=NNKtPg/m4JN9sT9FnUpRaZCxgFyME+n24bvMKYH43WLrYV4aPVmY9sbrAJp59LzXJsRROee/3LQmIan58WMBPWdEPvBxWqM3rekHUWvQSKvYwUDDl+YCzSjmq5C3Y3+Rb1HBF2wMWiwI+ajvd64XPabpnH6w8QmOZumBBnBcRQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386967; c=relaxed/simple; bh=D94EpgcBOw7XpW8dFSl53wbliA2dVLQsK7sAMadrCb0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jplpwvi4gNDVSFBtLjSmNAmU4Y0emuYJl5Y5PW1Z9XAvRmp9Mxy0JPRmR0uD6UKk0t4baOgwsNH+5vu932bIPZKqW0mnw93stYrhG9EG4MVjhvVzzUJ8/2n3qt2Xj/7+dbJrT1/yrhpDnCL9G9ycPnfBB4DY9krWSKsAUd5Nj2U= 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=IeCiIMT8; arc=none smtp.client-ip=140.205.0.219 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=1714386957; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Wijyh1yP2Yf03/VPvTBn+/oZ8/jA626iTOgm2E3/T4s=; b=IeCiIMT8W9i9d0/fphz6ObG9gDnl+7uKkTwAW5dUT26y+WdiMrMzNl5M+rRnkocnA+QF6ly15ttmGS5Ls3IfQ93qDgjG+8V29yfhIaHQj0YuTVlnGM+9V6XPAmTqHo6tMOiw2dOmgUc5DoRpsPCJDIwf6pRapDa/zGctfgUJbKc= 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" 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 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> 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 | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.19.1.6.gb485710b