From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rDyATUQG" 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 >