Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp310594lqh; Mon, 6 May 2024 22:35:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLpDcrK7bEJ3+1aBcrNXTimFfud1boet5AQNFGrGZXW1RSv5NMEUbb8Y15ZRHwaVnGnVoVOF0ACJZYDSDllUaUYA36BeOAgnVtCEMclQ== X-Google-Smtp-Source: AGHT+IGVxlbJat2su5PcqMUjOTDCoO8K6wLWvDH5OEEy0Erf2szu22eaekWya6xC5RuyFfldBLE5 X-Received: by 2002:aca:2811:0:b0:3c9:6987:cfa3 with SMTP id 17-20020aca2811000000b003c96987cfa3mr6752032oix.32.1715060139977; Mon, 06 May 2024 22:35:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715060139; cv=pass; d=google.com; s=arc-20160816; b=wwxj12buQ/qfiWXh2tCJeIfc+ZpnPP2iF+yLM2smy+Jsj7GcvfqzJsXRbmGlwsRC0w mkNFN+GmmQWWv5uqnopvvWAS4mfcOiN//xBva1u7wvlJWcVmZxYWkiychWh2X+Pu892j c31prvmfV+JWrJG5VVcymz7bjKW4z8LHVMiC+jSvRZhgqdsg/WSVxEMXbyMgWVlJvDFu DxXSo16p2hIykwLctphHLa/Rw516ekmB60yyNbEE7sId3EdpOgcc0kN0KBKGulidzFzT d973TQ+7haX9vd90C6SbGJjMJwODMSBOkB+faFhATDp1hct4jk47fxvHk7vuF/R/7Mlu TvSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=/L1B0x8t9rFSQ4gCEjdvsDzK+E1Ij/sKl00Jy2JSCCg=; fh=a9yxNpfiFZNoZpMpH7xJGmfA08jqsu6SIrhQ8mbRWuY=; b=X6cYMji1Mkrh8qYgzF4Xq88dKgUZrLwnNIU7oOhgiMJgCy0slCWl8vItrBfVDwYCIn YSLHkkpW1ckHBDhnGarTKwU7Y3cyqkdr/8ekl2JUG2xaWgSQZqo9PjFBcI4za0mwUxFr TWHnccRHc1+GxFWII1bzM2uAUBmHZTybIznCo8DPB/B7vsMv2Ga/hOWIdYYiT5EUmUaC hfREjl5Fov7YcWbIB8HSV1VH52hDQxCN4fBnyH8lsLFi6yn1dtVW1RM23D8eAt+lpWBA ab/irSmSETOFsP5TL1obu8VNNguR3ZCs5DNB+HhdPp+99fpuwhR+ub3C+WwHG3i3ciJO kTeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-170697-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170697-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d8-20020a631d08000000b005f7bfb43abcsi9957519pgd.169.2024.05.06.22.35.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 22:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170697-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; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-170697-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170697-linux.lists.archive=gmail.com@vger.kernel.org" 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 6132BB23ED1 for ; Tue, 7 May 2024 05:35:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4E7E6BFA4; Tue, 7 May 2024 05:35:27 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 34FD44F616 for ; Tue, 7 May 2024 05:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715060127; cv=none; b=d04xB1XmcyjEjazyLxUXu5Hydlo254QQOK6fAnq2cIq0+vKWbBDVBLHoq0zT+K4Dguev87zjp+4YJqlqXHHC+yM0uYnHoKihQYbXhwK/2pcAY++dMXKjKcBJT+/80Auz+B3uwUB6Wq8Bg7JtNYTLKVWVVWSCg4FXQxKMCtV7bPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715060127; c=relaxed/simple; bh=R1izPi+9m/IigXoYuUTrLyfKZKRClql2EXOPJevJbxs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VMwXycc1/e1VVuZWj7s9QXFiO2VIT6nX3z19e+hfiUQOCoOLnLwtRkJ/yXFvOD7lcdzxsxC3sWQKBia2X58XDzBa9DGonx0qngBOSaPtVshTWJfh9Whrybrqb6hBqfje92dicxffrCVzQDuaqL6aHbXMQ+hxq1ySuCmA32sRJIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 4BD24C0003; Tue, 7 May 2024 05:35:20 +0000 (UTC) Message-ID: <5a812c84-c3bb-4874-b29c-0816494b77a8@ghiti.fr> Date: Tue, 7 May 2024 07:35:20 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/5] riscv: Add update_mmu_tlb_range() Content-Language: en-US To: Bang Li , 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: linux-kernel@vger.kernel.org, linux-mm@kvack.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, david@redhat.com, ryan.roberts@arm.com, ioworker0@gmail.com, libang.linux@gmail.com References: <20240506155120.83105-1-libang.li@antgroup.com> <20240506155120.83105-4-libang.li@antgroup.com> From: Alexandre Ghiti In-Reply-To: <20240506155120.83105-4-libang.li@antgroup.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Bang, On 06/05/2024 17:51, Bang Li wrote: > 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) > { You can add: Reviewed-by: Alexandre Ghiti Thanks, Alex