Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp953864rdb; Tue, 30 Jan 2024 03:55:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRV66v+FkmmgsbL1710r+wijiPSACIgAYEGvNupz01ABd9HQiJz5jg6AqmLN5PLmTfUhjM X-Received: by 2002:a05:622a:1450:b0:42a:b6f2:666d with SMTP id v16-20020a05622a145000b0042ab6f2666dmr1188303qtx.35.1706615749169; Tue, 30 Jan 2024 03:55:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706615749; cv=pass; d=google.com; s=arc-20160816; b=TYF6Dsr2fbEN7S3BqgM+o32qS4Xj8wa61TliZ+P0RAq/uNnxwF2W6RpBBYSeASofh9 V7LnMLPBiWVawGkP3tOgRnbtQOQy1IFjVeaLmvU/1q1lX8FjiVbWOQjU+DndHS17BJO0 fAqylx+RYvjpfdhI/3wnWHDlVzegMVHOVBMKunY38Ysqgp4JxVXPlq5hW+2UGqBDcd23 kBfVXggNBTde/Nv7u4xl6J2HT7yThZ3lm0o6rnIkx1ODBvGLonVVmEpDG2oeGaHuB11r GxnomFYv6XgW3JM63lykWLO76Fv/SoOoqbuAek2BdSnkQT4Bh4Z0gVhUmQvTqr2WHzOH bS7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=96xTLiCr7psVkkYjzXmoBovLDjznb7PjBA5px/xb+ds=; fh=NDBODWWlTiFpPwhvRUoFJ0F7xRSjA/wzgdHDQhsLZmg=; b=IYKzwGW5TwEiu9+81VZADEjv+HzfQr8d7kTNn+yt1f7hYITvU4/FSNjV5RzWO8072I Z22TiqMlSWnAxmQwJLIMp8ZT6o+rSy75C3LQRMzg1V1+eL3ZBhltjNobBp0hJceMSdBC DoIf+7+iZumTpNgnrCXbjYbOPp6GRsoZPmlNfaRX5oV+1rh4P7WoVN1r71Q2UY91fWuE 77TP7/QlwP0CuWPML/Un4U4ki/IzvFyB7W4GoLdAU4PUXU3O9kce4++500elxs3XvGa5 avwVetdP/Vn73A2tjWi07AMzDK7IA3sDPIDr8pi/0kaWoHsfV7C/fwMU1pbrGkNEDAnj yZ0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=MxPXLMe+; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-44558-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44558-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t1-20020ac85881000000b0042a6340c7a5si5760109qta.203.2024.01.30.03.55.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:55:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44558-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=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=MxPXLMe+; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-44558-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44558-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 827331C253F0 for ; Tue, 30 Jan 2024 11:55:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CEB867E6D; Tue, 30 Jan 2024 11:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="MxPXLMe+" Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 6702967E63 for ; Tue, 30 Jan 2024 11:55:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615714; cv=none; b=rPe6mmxAexWIkwiAHFrfH4C4MUFmDKe80OhF+ztNkBIBCF9ImDn47/jpy1quyqj03pHNCgZ1OkE9s587XPR9M6MkEwKJwJgaZPj/T/SPIWV6I91NFT02qq+3t0NGcuMnRK0m/q7c4QlknkxkPkCaLV1TBCUt3EmBxbCeK0ED68M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615714; c=relaxed/simple; bh=o45m/mtm5VLmwqkGL2en//81iIvC/rh+THDkmb6twWo=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=t+kHOp3XcapTAtgUovM+a2yKgatXqq7cPb4/BHqxpFWrbQBM/JM7t88pOruiNbNKk0qZ92CwVC/XNg/pvm6u2cb2BkWGZ4DOf/7gVMxsxMheWQw6nyJWZlPH9ubxe++lmF0OVg3ijKDAGYrj5Qkgu/wYZq+ENQtWa3EudEMw+/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=MxPXLMe+; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-33aea66a31cso1176981f8f.1 for ; Tue, 30 Jan 2024 03:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1706615711; x=1707220511; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=96xTLiCr7psVkkYjzXmoBovLDjznb7PjBA5px/xb+ds=; b=MxPXLMe+ddh53GwafpLjWQe0+lbNq+ounMXH8yVRAsUI+aFvBA0bfNsyipTKDDIrO4 vMqYcLXihiamrw0QgPBvD3gwzP+GT/Y9dIcVwX1OHydIR33kHD2p2ZxY9bweqYgr241v hGJsIw71Rg9aeb+Q5Ld96NovpdQlTfZAh0Q1uIzif6nVYaDRwdzSWq9pUNgKoUqF05Zu SAOeyIDKH5SU9nva11FXWcIawSn4oOfJ1SqD0+wCt9JL+QqgbUFwE1Xemm4OVQ/jl8IK bIZ9BiGI2NMsf0E9mDuL5sPwhNNFRULz5SWGicgR6I/bRENjjn5qre6nBqAaGs7phBwZ lDGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706615711; x=1707220511; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=96xTLiCr7psVkkYjzXmoBovLDjznb7PjBA5px/xb+ds=; b=bpbfL63t7QFQtObTio5lDnkv+f1wAheTFjCVF5bZiKLHemWoGC/qL46sTiHngH4NHv kowkrLvmm/mGm17ESRG140EmDkR6Z8la2eQ83mwe1gWwc7x7MVsZvanGXhBWL1C/RjNY kAIgxuRP+h0qM65BEMhIWGUxygndJn0eTc4lkquftBJ+47sSft6oSk5ZUCjza9H1uMoW X10VKXW3Z6U+rngQS9rBrTXx4Pk2/g99Y4cJmpZg4stTapkTAT2JlRDX6UnXD3zlQRH2 meUmK9CzDXpdoex2yEuFxOGq3BitEaebF7Eg0YiITAt8CE6V3rLuAHaZYtOlXyIBeZod jr1w== X-Gm-Message-State: AOJu0YxLp7cN7L7+C5osMzzsw0BlRBSrQizu5S8QCXzSZCXK7OfYWU7H gklaheUG1U4rRMee0pM/BSEPzpHQu1MKhhs5MMrb5vMjTB2hkOaXDNfiR1zIGjg= X-Received: by 2002:a5d:4a83:0:b0:33a:e403:dd91 with SMTP id o3-20020a5d4a83000000b0033ae403dd91mr6962974wrq.21.1706615710690; Tue, 30 Jan 2024 03:55:10 -0800 (PST) Received: from alex-rivos.ba.rivosinc.com (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id s18-20020a5d69d2000000b003393457afc2sm10502841wrw.95.2024.01.30.03.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:55:10 -0800 (PST) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask Date: Tue, 30 Jan 2024 12:55:08 +0100 Message-Id: <20240130115508.105386-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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); } -- 2.39.2