Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2943347rdb; Tue, 6 Feb 2024 02:28:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJwXR+D5jN23ZzF09BSEQyPugweSRACrqWjbutM+BiINc7+52gwW7o1K5Zbj0BtmxG+nvI X-Received: by 2002:a0c:cc06:0:b0:68c:7b7d:76bb with SMTP id r6-20020a0ccc06000000b0068c7b7d76bbmr1754587qvk.35.1707215287343; Tue, 06 Feb 2024 02:28:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707215287; cv=pass; d=google.com; s=arc-20160816; b=gSdyI0a2TF1/x9rENqvRHvrnBZaLaO3HeZhj6qVrXSYohtH5IbX4cOTgfE0s00jdeZ R8TnW5hKFAWhP2sQ8TVDY7b9A+usbTnLvL5VPW9i+rf4dZNuoDBMWTC+MxI5LHyCxbzw 4hz22J1VwQhxL6CVvKkXdtEhcxVThChha2ZoWaUNY+SqE6v9ksNGBKeWRjzEtqKOUSLS 3qlDwc+RzpdOQL3iBV1GM0EOzzEiwDP6SYBTuZG2IHi4zZyxn2XXGGPv96wVan3vEBut UATSwxkRJO3qfxA6D+lhhZeqN/Vo+MAyDUkELOLeIk4SZGzaSQnRgR+WFo7FFr0UWWkq +IOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wL2XaDrz9Zzdo3dIVcROropReKDbFnXvTTG6U4vznPI=; fh=I7HXP8hqyRhN/EYQ9MgoUYTWh/r/RZWPsK/HyQKdZ3c=; b=dfuWTkdMG1B7KbFh2BdfsvG5mIG141YD/nS7dkubYOsrDDd+O7KkU1rGwTMamcMRiV hHQJzwwKfg+1X3Wvqqj+9bA/yByC8xJXsNK94/7opqnWrZQymvEYrLp3+mXuIbnSiwAp /Awn1WJCID28PICKmY1k1Cdtcq3QDMB1q7s8yKaPpoUeoKCIZPhwOyEUeNK5vMA7DrAm cOADsXMe2O5yRQha21QBTybuBKou0mj2DasQh+Y5OCxzGQ0m53C4kmoF8sXqaeZ1h23b mi8fG9RE/HShL9dsfHJF2JHIJS2xbqOQ/mkMHdMsKiy3ODRD0lcJBNfFFMLLQ86w5gj0 A2sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDyATUQG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXDMurcRVBfCi0Q4Fk2j12qwCmUHJdOj+X39CuIJDdd7KGgpCZTVNmfM0z6NIKqgZLIkWzQ+Tgm8SJJymgkMelHAosmL5z0Z9FsoFG2Iw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c12-20020a05620a164c00b0078329ba5054si1920892qko.193.2024.02.06.02.28.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 02:28:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDyATUQG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C4731C236C9 for ; Tue, 6 Feb 2024 10:28:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58C4512E1EC; Tue, 6 Feb 2024 10:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rDyATUQG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 819FC12CDBA for ; Tue, 6 Feb 2024 10:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707215279; cv=none; b=YQ0E4m/0IxPEmdwlFRHlZ8zPpaD/vGoAdmRRp4MI3r9EIP7M5uzPORc7C0u2T9P1RSSSFjrF1ZkRo0yT7i9oQUGKzyQriTJH5KWuky6VtflhzPWdNGK1Z0faUcM51oMd8YSF+gYXxCuNXscKnSUSO6AT0VyOPbBi2MXaTrjX45I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707215279; c=relaxed/simple; bh=u7wVea/4SlPP6+h8wkS+v2aRTJMeBzRcPmydx6VUVxg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sHEfYkbj4bugl0IF+o/drBh6gNU9Tb45vFR6ItFikrPO4K7uJJFNXoHR7xUJUwwZG9fzqQgMAes//YEkfkFvl6Pm6LPPemB51nG/iA3q2AhvqE3MdaiM7Mu7OM5vXvMRIe69flnV8btjBKsXPsqu9P0JOnTJBYtqAks8kXYC5Oo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rDyATUQG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F2DFC433F1; Tue, 6 Feb 2024 10:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707215279; bh=u7wVea/4SlPP6+h8wkS+v2aRTJMeBzRcPmydx6VUVxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rDyATUQGLxwlWacikkMc8egWhFadby+tHgYFnfV2j5PI1VZurWKjs76qQ/mVFMTP4 XQgkVTpQJG5MYyPUyDTyYDtp99q8EVkXl0dvjnpenPkgeD/Gqr0R+F4T5cQIHSOtFB vEGV7bbUGRNjb3XDJMD8l9EMJF2Ki+v+9FrZWL27tKvcIgkyucAsMOzCRu1Z2gcrQE J6YNFGdutLdnmQKoviIVcaLK5Z9wDh273+fwqL/QQGXjnlh9tt/GurukwU+OLMivqN a1hbMwkvb2gy25OFKMI6jf81NsLrVzqCSa8rg8SguUMq1kKfEAbce2FA+LkgvuevAa CUV/dDV8DdtHQ== Date: Tue, 6 Feb 2024 18:15:04 +0800 From: Jisheng Zhang To: Charlie Jenkins Cc: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask Message-ID: References: <20240130115508.105386-1-alexghiti@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Mon, Feb 05, 2024 at 04:26:55PM -0800, Charlie Jenkins wrote: > On Tue, Jan 30, 2024 at 12:55:08PM +0100, Alexandre Ghiti wrote: > > We must clear the cpumask once we have flushed the batch, otherwise cpus > > get accumulated and we end sending IPIs to more cpus than needed. > > > > Fixes: 54d7431af73e ("riscv: Add support for BATCHED_UNMAP_TLB_FLUSH") > > Signed-off-by: Alexandre Ghiti Reviewed-by: Jisheng Zhang > > --- > > arch/riscv/mm/tlbflush.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c > > index 99c3e037f127..c8efc3f87a0f 100644 > > --- a/arch/riscv/mm/tlbflush.c > > +++ b/arch/riscv/mm/tlbflush.c > > @@ -240,4 +240,5 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) > > { > > __flush_tlb_range(NULL, &batch->cpumask, > > 0, FLUSH_TLB_MAX_SIZE, PAGE_SIZE); > > + cpumask_clear(&batch->cpumask); > > } > > -- > > 2.39.2 > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv > > Reviewed-by: Charlie Jenkins >