Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2731691rdb; Mon, 5 Feb 2024 16:27:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8tvLjrcsP27o1KpFlOa0o1Me7tTLojM4w8YhhBmhdS5XXrzrtWGi1UYeBO9cn5S16yL4T X-Received: by 2002:a17:902:e54a:b0:1d9:a890:e714 with SMTP id n10-20020a170902e54a00b001d9a890e714mr122173plf.21.1707179226249; Mon, 05 Feb 2024 16:27:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707179226; cv=pass; d=google.com; s=arc-20160816; b=xGos1gfYwhbfeFZ2/DJ2hEdxzpE3nMmXT2IcCEiy50X+D9ei7G63i3m4C/hGTuBOQs 8Aq2HMfIebfNg2n4EEVRO9LGxwHMQlwA868t8l6AUZgf71ppQDe0msaRHdXncBwsMiLR LXRn8vT88KghqCdvsNEMPsUD8eXAIFCOza47Vm3Rf155bXdtWJ+LgkSoJcogFXWVTmmg 9yUEkNEZ7mh+CJmLzpuUho97KeNVbyrumK3QK7ah434oXcmW807iy3OJNv09XGhC4IhB ZR2aIKLjI6wrCtN3MgQe1UA1mBYDV4rQ/FbcQ3oWi5I3CjP7cetC20aMOGDWCu48r6K4 9unA== 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=fiVjpSDFqDkt9XNvIzkLrXyeTIMkWHM8SqfmdeXNea0=; fh=HSRu85zE9wE3uPQrYI8oEoTAkz+GvqyiCrzRWE8mn+o=; b=raBrwWQby9HEWwuB1ftg4my5b89qzBB2tMAVD8zgafHu1AfwGzMTK5L12NR8JXV9YA I3a32OYGkozTChGsTnN/eIzQ0S7RB0fU0tvsAtiRCVxA02F+2HoIKuTFRqU57MSasbjB saPjTBUFoytMBUR+Hl2YIOJYIqzXbJ97FE6VepKE0KXUx2ot8VmxSqxO9c97BVDuG5IA S5iOT5dIHh5Vwn6wg66iC8E3ge1JdcYucS0UZ5xxAj60fZg3PXoTn3FpXzBhsQJ2eI76 dJGmBts2Zmysl/6B505wbC7tqi4nuRsfl/sBHkwKSClMm1KzRCn5tTx6NEJx6pSRk4yX Amuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=RDRX1Rs2; 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-54126-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54126-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV1LJmxnpanVLcS3ooPBit6QuweMSuuWt/i9DIyAMhblqIwg4fPCavTchzUosii1k6BUhB3VSeL+UhtuV9wQtvSO9NvPUfhvzOuuSQqPA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jg12-20020a17090326cc00b001d9daf742c3si79463plb.401.2024.02.05.16.27.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 16:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54126-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=RDRX1Rs2; 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-54126-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54126-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E011E28B084 for ; Tue, 6 Feb 2024 00:27:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0050F15A7; Tue, 6 Feb 2024 00:27:01 +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="RDRX1Rs2" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 50FED1373 for ; Tue, 6 Feb 2024 00:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707179220; cv=none; b=mdI731TKdPsyEVc99pCatwexjro5w58WAkpvZDbuEI3TE3TL99B7YzCHqkYm3HEEIBEnz5w+EOeUYBeynqN5bCOQmfzX/UQg0UuRvnhEUjPTgfDAM45TIbM2dJ4DiXxkjXrZ7T7CDPnsxaa51Bw6tqpRgNAqWAFYa9Wvnf2Fxm8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707179220; c=relaxed/simple; bh=3TwmDwJT/rL3DMMvAVgIO7o1HJINmVPwu07+FNLBODw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jecv9dtXJG86eTz65zF/SLT0kdO/fewSD2dSn+7hIhJC43J7F9U9dRNPN41GmemA3X4aPHSXdGzQ98FbC5TzvC20bd2akC76e2SKpmXPb5e9KzrNjj5LAcEa98G8oPX6k3BMNnhMeB5f3kkEA3L0TB9IZa2eKroSbyaCAMliVe0= 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=RDRX1Rs2; arc=none smtp.client-ip=209.85.210.177 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-pf1-f177.google.com with SMTP id d2e1a72fcca58-6de2f8d6fb9so3776088b3a.1 for ; Mon, 05 Feb 2024 16:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1707179217; x=1707784017; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fiVjpSDFqDkt9XNvIzkLrXyeTIMkWHM8SqfmdeXNea0=; b=RDRX1Rs2GyzGS448zwA5HB/8kjkxBe200nVU6eeKiUN0Kcv3/NkCDYu6SdOdj7bZBp vfrwasNDy/Qhb6FBDGVMgUcubCqtLCGv+7b3L8vShWFIcBN2JPc9J8NLqMiGFq2b597h Sp2bp8HCwrKn+3t2Ur3mynLq0caXbImwDzDw9Q+WGB6kvPDmDP27JaqaRcZv9qDERfjm QR3RLy86sf7aPzk9K6cN/V+2NPjjjmifAN3lbISlh4MC9hwn2lOQuxrB/obsg9SJ6Ivi /tIjq+Ikk3xYcdwUluG0k/r33SAAOOn+qmQ6TDlzK1WT2tCfhLVnVZxes8azfpOWFjoQ 0wlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707179217; x=1707784017; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fiVjpSDFqDkt9XNvIzkLrXyeTIMkWHM8SqfmdeXNea0=; b=Bq2Hqo5wOl2ZwJtBu7m76rDHvEQnqWrpcayJcxWJ78+B2gr94YTmiwn+d8EpDjKCdQ JkX4L6VgKl7wTtxF9m/OLNcSJnSyGePVTj8NpshrS5UAqNbSrFp4cWWfTgMVRcpWrueH lMgODm5hhYEmJcuovEj1OWtfMbCzbwD0+TirTnF2CVk/v9QgGH50O5NYaoDAShKmPqxz QOSMBQ3ybLJLEa4NoB+52cuKll5zXecsLSpW/F37S3COqIZYIeijABg4mecttFrYM4d5 pess0qKVVTUOOIqq7GuvZ6qRR68Y2zGFjrqqWucua6ZZb8FIbVqCZp5W5aJGKIiwCNQr nyZQ== X-Gm-Message-State: AOJu0Ywx9UQhVf+6zRLp0dsJviuCOq9Cmz7iK3yfrcEiXkpnQNkvMbij tOsH4aUg/oTh1xAoC8pxxVWu91eqUCSddps9BAgOiPMNO78xVPkzW7w1f1eqL+g= X-Received: by 2002:a05:6a21:788e:b0:19e:367a:2ca9 with SMTP id bf14-20020a056a21788e00b0019e367a2ca9mr143337pzc.8.1707179217597; Mon, 05 Feb 2024 16:26:57 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXuxl7fvNMncJzVpzTszUz0jVy3RKrVSRFq9HMCATFeYqQ2K4Xs8LZ/kTazqhiy1ELGqU/PG1WZ8jG+JNbM0l2kGIOnOZBEiwfxm4NgppMD5ZTW0fvTyMOlVS5hhFI4CyWG+rrdacWNcMMTf0c9tTrq3cOSWH15M2jCROPLOO/n/A85UD4n5jVgfa9iSFhuoDUguU2inNzIHXdQmoXOF7W+sx1AYGdfYRaMd8xv Received: from ghost ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id y32-20020a056a00182000b006d98ae070c3sm485463pfa.135.2024.02.05.16.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 16:26:57 -0800 (PST) Date: Mon, 5 Feb 2024 16:26:55 -0800 From: Charlie Jenkins To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , 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=us-ascii Content-Disposition: inline In-Reply-To: <20240130115508.105386-1-alexghiti@rivosinc.com> 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 > --- > 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