Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp520975rdh; Wed, 7 Feb 2024 11:24:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwpSyBRDO7ruJtTpBoHzH0YBaS9BIqYBPGZVjy8DoZeQgjbp+aaN01b7z+NE8WhHwOxTS54hjh21vw4WfkS6dsF59BMFKpzTkwq4V5Aw== X-Google-Smtp-Source: AGHT+IGdw4wFkHTzoG1cfexQ3W9LGGFGOmyxntI6OOQ6vGk6Vrf7wtDEfutdFy9kcL+Fhdu4UFBl X-Received: by 2002:a05:620a:29c3:b0:785:9d1f:4d30 with SMTP id s3-20020a05620a29c300b007859d1f4d30mr976983qkp.0.1707333847831; Wed, 07 Feb 2024 11:24:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707333847; cv=pass; d=google.com; s=arc-20160816; b=jKL8dGg9spxCRxRXDXN+c5b3Yy7MyNMfw604I2zgf7tl/ttaJ79emJCg7/CQ/n1VqZ /dPPyx0YUltGI6uwnDXF6Jr7rnWuODS9JXjAEUodaKN0aZY4pyTUlOJZBtC7fR9sAOWw u8KeUhlhbsvulHXOoUoHkxMuJ8U13XcGAA8BruYbSbPPmidMQhjwljrBlEytIAuAwt3A rmyRCNQChCuvoNVDiE39rJ2Sa1WshZ9oiOi0ibBeCQ/3k0HMR8Y+kVvuFVvoersKyH59 vBeOwdVhTCdgtYwbeayIV/T4ia2FPvFllkFZJ+Om9+2PZIMq3CsipbptfkPA9y5k04iw 9GDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:cc:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lRrpZ4A7adNY9DTQi8mLdXm1HAB9Tl2AxirgbrNvbSc=; fh=tLPgpjitzqnXMG0BeAL9hMWNaxEzZRcdASSj6wbBJbg=; b=GH4hqJGGHJeNUoLz6AIIj/yGvOLU/lsHjpCFVhga4PwFo0fVGOkfqmuFBe5Q1PV5VD Pi5T6g4TksrxHAXepwOdYhPXR7I15PztfqR3D3+mMY/m3Rc6/1uNxNMJYaHh12P177P0 1zZrRDwDObC2r6lk4mc1YWRvz8VD36ThPWptJItniw2FlfhaZmE/W5jV/0oxSmQWCfQz tMLk3HdLQvCveyGxI5gtpQ5/VwwHmLEqhNkysBhtuikLVGc56WVkG3cPdIAM6ivL7sIM 4XaZ7ZASuGVNTAtlPodGIdLXytXMNlA/t6FvH8FJPJVBT7Pe+VNmgtcIb7c/tt9MInhN LdtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hxq+xGRc; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-56982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com X-Forwarded-Encrypted: i=2; AJvYcCVABcOP3T0GHb20ePOH836eWlmfgDFY7FH+8jVPF60vk+hS4C0QsE7wgYv7Fv8w9Bqeo4pa8XCkg//1Fvb+3PNGPnAW/tDrDlFdL9X7sA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q18-20020a05622a04d200b0042c3e506c68si1735075qtx.525.2024.02.07.11.24.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 11:24:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56982-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; dkim=pass header.i=@sifive.com header.s=google header.b=hxq+xGRc; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-56982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.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 8E89D1C22E08 for ; Wed, 7 Feb 2024 19:24:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A8DE85276; Wed, 7 Feb 2024 19:24:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="hxq+xGRc" Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E720340BE5 for ; Wed, 7 Feb 2024 19:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707333840; cv=none; b=gCJ+p4j5Wja1MTFfhQp3LA5zeIRahc5QFK7UXQaDG5K9hVhaIFE0rp+fh9MwiltHYbw8nmRdc2CgtqwwGZvLLsWEgGH9KkIt1FMbFr6NkmbtFjnv1/YSRl0s5Sctwjs/fDSowh833YNrFLkqoivysB4TXmbJ51Q4c9P/UJ97Gfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707333840; c=relaxed/simple; bh=vVP9+4bMTGUVEI7wClHTNeWpJAl3MhpB/Uhdm13l9a0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:Cc: In-Reply-To:Content-Type; b=ae9QKazuruieq84FffemsS5iPQVJ2c0aEZqm1KBEd4lNFzM7i5SuYcamlpXrsR1jcf3duJPC27sAPx9B8FSCwivTBlNZutAyEli7R3YZVHm3E9Apqkos8l0dElStronr4GA2/IU2B0BSY8pNL+IzSlfhlpdnWYNXhtVKpTOlddY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=hxq+xGRc; arc=none smtp.client-ip=209.85.160.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-42a9f4935a6so1342621cf.1 for ; Wed, 07 Feb 2024 11:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1707333838; x=1707938638; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:cc:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lRrpZ4A7adNY9DTQi8mLdXm1HAB9Tl2AxirgbrNvbSc=; b=hxq+xGRcQfrfy3QEYJ1UQzpxvkZODDkEpYTlc9IWSpRQP+Rh1d0vNPSC/UB2wnrAhb PDsI9nDNyFIvMtH+qsFlHdmRJSOJM0o9TKE1r+LMCTEvHrT9BIaYBFe6ChQdY82cyibE sBKXUjTM3kODDSRwQYX03UHdmLNZ25eOC+0PEZsKk9oH8HpWg9ZdJrJI538/BqhT0Vlx JxlBgocOQNyPtGW4CrxB8Mf+d71isi2oILddaJ1OZ/RRmMwLYrm9KczcIGeFm/8pTucf LA59QJc+ohix5FNrXodqrR/LQC3S/WM6MruRKC6+VBq6dEL6wJsIO2Ojx9Vz/QcpXLbA jkuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707333838; x=1707938638; h=content-transfer-encoding:in-reply-to:cc:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lRrpZ4A7adNY9DTQi8mLdXm1HAB9Tl2AxirgbrNvbSc=; b=eYyQkXqpJvFDbe88SPQF0TR8EDYx6DOPxpsoXBSa6S6bVjHiYPaHzs5DSgFqXiJCHJ zLyAeSLBoGg7CTpKHPbHZjE1LAlsxiqcOgxzzYAO24z2TfZpV+luXPyp1M55uMJCfn5I 3j8wV3RV4wsJtUiPsPI7Ad7yhvqZsGeDEZpYdh2zC++8zRrTApyFgGqEAgY9FCBGs/q3 y+NAbaRZiuB4slTqQWXGdLpxcVTXozPFdbg5GI10lFTL5GlCDYaCoXqYFbHGSLVz56ek mCK3L/DK9zPaLzw6LTWorj6oq/yh+mPJtjthpcs5+lQLxoBTbx7b8MQtAzi4IgQrv1bN fKwA== X-Forwarded-Encrypted: i=1; AJvYcCVl1Rxw9kXSU0VXRNsHEwsMtwrFRkCDvd/d27/qtX3ilX6cEnfmznFuy/X1T6RRWQTGzPQ6SQZ8hapdOkXFxcT7mznsH9ViIrUMky/k X-Gm-Message-State: AOJu0Yxvm+mOTnTAbS8TaOdCGK+Gh1blDIzvPHhfC9sBGd6OSrTNp9AT MpzmYcsmC5z2X4jU1cQjN6qQBmiSzGF/NeolK8U6ffOxyC5mXFopzwpK+N2N4y8= X-Received: by 2002:a05:622a:14cd:b0:42c:14c2:bff3 with SMTP id u13-20020a05622a14cd00b0042c14c2bff3mr763674qtx.3.1707333837841; Wed, 07 Feb 2024 11:23:57 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXvGkEeWfyuyC+/wI+zPl0SzRwLoYhn+vcYjRxOL1PRJI26g+eg/OzjiDYYNASDYrjSHOsnAEWWc9k0dpxy/7d2fLMV6x0RWHiQgaiJmrhSP5Ed4uDYM+DYKKUW/hEiA6NtLqJ4bvLsAgorZ7hVKBOxGu6IMk7vXZ0bpj45sVLiiB+0ohUpI6qRSLS0r9R6iXEUAXvQZhdPB8lKeGQUfoXko8Ydi/7OugvKnDgx Received: from [100.64.0.1] ([170.85.8.192]) by smtp.gmail.com with ESMTPSA id o12-20020ac8428c000000b0042c00beee84sm785444qtl.43.2024.02.07.11.23.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 11:23:57 -0800 (PST) Message-ID: Date: Wed, 7 Feb 2024 13:23:55 -0600 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 -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask Content-Language: en-US To: Alexandre Ghiti References: <20240130115508.105386-1-alexghiti@rivosinc.com> From: Samuel Holland Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org In-Reply-To: <20240130115508.105386-1-alexghiti@rivosinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Alex, On 2024-01-30 5:55 AM, 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 > --- > 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); > } This patch doesn't apply to fixes -- it looks like it was based on "riscv: Call secondary mmu notifier when flushing the tlb"[1], which has not been merged and would go in for-next anyway. Otherwise: Reviewed-by: Samuel Holland [1]: https://lore.kernel.org/all/20240124080325.2324462-1-alexghiti@rivosinc.com/