Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp261951lqe; Wed, 10 Apr 2024 00:58:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVetCvl/5yahVO8hOCi+q97VVjktwm2rUJyzRfn5pGqef+YUmSLb2NXfd64J7Krv+l+bVghscsvbzVC1PEp3WVIlfJ8odaZs5SfdvSPDg== X-Google-Smtp-Source: AGHT+IH4NlGeG2OUsAxsILgfWR8ouNppCP4JYZVEYtU77a5q07dkEO33/fbeDC8T/mYIUMKr/6l7 X-Received: by 2002:a05:622a:87:b0:435:9c32:ae57 with SMTP id o7-20020a05622a008700b004359c32ae57mr1082868qtw.26.1712735931317; Wed, 10 Apr 2024 00:58:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712735931; cv=pass; d=google.com; s=arc-20160816; b=eRxZ/PJYGVFelOs7qwX7jNTrL/J5smLOMMFKCZNKYQjA/UCW2kjz2zrtklqd0asXre 4prSgW4ntGwPVK1wH6Lmp317KkyD8Sgo/qeHGzc/zlmvvQ5pjowUCR/9mE/rjw8Dtebm fUg4A/KyBnuXRsN6Bav4F4+s8DD/GIfDLW4scffne3dgHcmdtB7UkQdAEr8otfBsv08u aIU6+Nn6WtiR0rfQz3j/vKE9NbqoML7R6fK/Tvx4BFRtTXey9u63RcmwnXBQET0qi7BD gs26TN6d3164RSTg8gSKbJXqtqbJMUAO7gEohyD5mXAKSWf5LfNgDa72EeVaCNZBKaxb QY4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=AiQjcSiJwEnDfwxRIsSq3ZWYGwLFaN0MG73YzmNAhwA=; fh=V3jTGpVMT+MlRAqwpmHhYYp+lUizD0NvGBdD/N1rfjU=; b=chljoNUK1TJ4zYIpbuwaVCm82kj7ceTxXHCzixoQammAtT5ZMWkjAbqsZqd0QjLoVD gCYSq7A5IgHiK6ZfREiEpYsb+67o5oCopES5Jx2q3Wrfj7WyR4EqcH2uqaD5dgVwkbgk XMa4rowx2K/GIKJL7gRadoEo+5FJF91Su9q3ZaLLLK0Equ4eahx9PsAeUqvpInZFjNeJ DEgs+V3Nd3w9m1TYHzQgvPVR6tDNmfXhGIFwFcxATx5LMywwKEB3nHYvM4Ss/hEE9rpD GunDCwH11eiT9bGlDMYJ/T3xxa+jWyTXjpsutqSC7xnMD2jMIe05/LvJFjxZ6Vc6ZgYz b4Ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-138123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g3-20020ac85803000000b00435fff22d4dsi434597qtg.596.2024.04.10.00.58.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 00:58:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-138123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C7AD21C20CE1 for ; Wed, 10 Apr 2024 07:58:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85C3313D500; Wed, 10 Apr 2024 07:58:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D47C13D277 for ; Wed, 10 Apr 2024 07:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712735908; cv=none; b=EdCdAZoSUSJLuki3UkQ0Zrst8wIvw61CGmg3lredFexBTUpqOd9hdAk7DaA0btIyDBBXfL5CwHuc5DAuuwlVDeuUodFqBT20e2CPkN9qFZZTaFjTaA8hmN1OliA0t1U1tbHiNWdEZ9FWtS5eHPoEgiinMUf8czlGOLnSHm8fppg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712735908; c=relaxed/simple; bh=SVFpJC7hpWdsEN6oXEfmHE/kIbC1/z81n1486492/eI=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=nprBeHRl4r5uMpyPJC7sZ8yL37VcZU3EtJ/tismQoXymI+yRjmoRPm4u7HMCyRFYw1aHiYUv6skDFMnfZ+YP2aT2817Pw8WSqpe6/FxImza14nRd/wcl+9HmWiI4X0QgcSxwObRwA/SmFGWuhYyZ4tEkJCOTuRpNRtsUGeOwas8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D3D251480; Wed, 10 Apr 2024 00:58:55 -0700 (PDT) Received: from [10.162.43.6] (a077893.blr.arm.com [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 802AF3F766; Wed, 10 Apr 2024 00:58:20 -0700 (PDT) Message-ID: Date: Wed, 10 Apr 2024 13:28:20 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Anshuman Khandual Subject: Re: [PATCH v3 3/3] arm64: tlb: Allow range operation for MAX_TLBI_RANGE_PAGES To: Gavin Shan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: catalin.marinas@arm.com, will@kernel.org, akpm@linux-foundation.org, maz@kernel.org, oliver.upton@linux.dev, ryan.roberts@arm.com, apopple@nvidia.com, rananta@google.com, mark.rutland@arm.com, v-songbaohua@oppo.com, yangyicong@hisilicon.com, shahuang@redhat.com, yihyu@redhat.com, shan.gavin@gmail.com References: <20240405035852.1532010-1-gshan@redhat.com> <20240405035852.1532010-4-gshan@redhat.com> Content-Language: en-US In-Reply-To: <20240405035852.1532010-4-gshan@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/5/24 09:28, Gavin Shan wrote: > MAX_TLBI_RANGE_PAGES pages is covered by SCALE#3 and NUM#31 and it's > supported now. Allow TLBI RANGE operation when the number of pages is > equal to MAX_TLBI_RANGE_PAGES in __flush_tlb_range_nosync(). > > Suggested-by: Marc Zyngier > Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual > --- > arch/arm64/include/asm/tlbflush.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h > index 243d71f7bc1f..95fbc8c05607 100644 > --- a/arch/arm64/include/asm/tlbflush.h > +++ b/arch/arm64/include/asm/tlbflush.h > @@ -446,11 +446,11 @@ static inline void __flush_tlb_range_nosync(struct vm_area_struct *vma, > * When not uses TLB range ops, we can handle up to > * (MAX_DVM_OPS - 1) pages; > * When uses TLB range ops, we can handle up to > - * (MAX_TLBI_RANGE_PAGES - 1) pages. > + * MAX_TLBI_RANGE_PAGES pages. > */ > if ((!system_supports_tlb_range() && > (end - start) >= (MAX_DVM_OPS * stride)) || > - pages >= MAX_TLBI_RANGE_PAGES) { > + pages > MAX_TLBI_RANGE_PAGES) { > flush_tlb_mm(vma->vm_mm); > return; > }