Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp260207rdb; Mon, 29 Jan 2024 01:01:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8hoC0WVrtd+jvi0yJXCkMrtQnIOSQaRFfaKYyjHmqaUyiirFxzZa0gLw7kOKMwVvfeZ2w X-Received: by 2002:a17:90a:f0c8:b0:290:3e62:93fe with SMTP id fa8-20020a17090af0c800b002903e6293femr4750529pjb.7.1706518871634; Mon, 29 Jan 2024 01:01:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706518871; cv=pass; d=google.com; s=arc-20160816; b=BZOaGsYfykwElyjXO1pqzsKIvK9BwNmhflIYMyUcVAGd3ppvS96RfQuNx+MWiQqKNu 5TWSUSgXmI2VjiCstSYfJWSxMBWmw11J+00DziLNgh/DOvhCYbfCxpmXeIuk9B4ArUIc 8JRl0F0xSswX5+ZrYJr0nAIKbW8rs5vf5s6c2UAcyVzeq19pQ9EEwJFf7CsSrtIpWH76 XlK+MHBCJFiOxjDrubOryV+zhShB5w4tUvCaCM6jB9RvAwBzwr4t+qCXo3AOS+QQAWsh 0EoymrFNLyK44vPVYEnke4w4l/vmVkGe+I3cTETsJPYU0/UhIqQONPGkch+LI+EdAo/R W5dg== 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; bh=qhYaJDE5CFB8YW0bqykwvmnJq3NUnNOhl7XZdq+k3Iw=; fh=mmkgZd+t7LjCN6hfYlxyid873yq5GWAsgbJvd5vF0kg=; b=vZ57n8QYwbGRpoYfD5+S8EsA0Ik/u6/X897cMnG06GETin4DXWKkp9Xzg2xFxsHQBz d6RkW6cC1gIAC63w6qmFO5VSf9EdNmYX3tHCODmQla4RSOl32hfLX6kuvMaB48Y7FMdI BpY0Ni1dceb7Q6EZSsTJ5vQF/qn7kwvffHbTf27I5ZMu3N89dPGZgK13kc4EQlrxREyx eyJkEdqg4HcFx4lFpHRuosHKp5cwCVpHphesM+ho+S/9AG751kf4xa1c/7Nr9ibWJ89s OAFB/Gve5oUjCEVoBhlQWhuS55iOU3PjGl9zusF7xunzW0VQnDV3CzZU+jTC+GMa077t LD9A== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w5-20020a17090a460500b0028d30acfe16si7314298pjg.47.2024.01.29.01.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 01:01:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42395-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F640281E01 for ; Mon, 29 Jan 2024 09:01:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A93754F85; Mon, 29 Jan 2024 09:01:06 +0000 (UTC) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (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 61C7C54BEC for ; Mon, 29 Jan 2024 09:01:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706518865; cv=none; b=FmOTHZrwloBS6yQIjlmA/f/v8MakIp3WcC3UOnhrommgDsmP6mhJGFGU72KD6YBGXhPhMcD3a9B9vcrUmi0bZjhu+fJ8E6UJ8h6o5vCP5BbfnuAQ50PrsVP5ZHWRapeVU8xpzVlYfMenmdLdjEG0HS0qS4PN5tfIK08cGX6LmKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706518865; c=relaxed/simple; bh=HICoyiV/FoR6mS+MJstzXo2ZfOx/kxWtYORG3VBolcQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XAhf4xjoLiM+oIkgVydzFQbmL94mD/HM7HS4eo+dDQU999fZvMYkApaOaTMi7fVAQza4DeXDjKyYtAJRP4CJjfVxYjCTxU0kNKa91w1SGimETvUXiHIiEhHfl+WjTYwjHSJyWeOa/X2aBcYyJaxcghsASSrL7/OiOD0Z9C0opr4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5ce74ea4bf2so1463574a12.0 for ; Mon, 29 Jan 2024 01:01:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706518863; x=1707123663; 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=qhYaJDE5CFB8YW0bqykwvmnJq3NUnNOhl7XZdq+k3Iw=; b=GoHy2qNJimS98/aD4gSUua18SP941P/bBX+GKUIOIlQp6TPUqUNF7ThuA/hW6pBp88 gm5SkawzEee92vnTiY3nSY1xCff+I0t5VGGOmtnhzFierd2zQNzSLeTqw8PQzgGslj5n 5X1y+5wLijiHDYeXzEZro5DGhhkC78zZTb6KyL+61du1LiUh3MajNrrZRVUBa5wgrToH B1Be+1om51NFJ8dNXb7IDzsfbnjEyr3bBSjz/r9B3YR1CwjV0li1Rx5tRLM/6qEkUK4+ NaCnpXZuxfNqs90n2cfg4QRAYGcu7j6Qrn2yfVsH2czfSJmrEqyQmduwgy+cMhnBBFXe QAjw== X-Gm-Message-State: AOJu0YznG8P41V8c1/aRwvdw2IJc+Yvx/vm4MbrJknX5O4EzPQ2Dno8d bMarnZRJo0yilkGf7urfpafJPpvzl+X4lCRH4M5HBxZm9tftWqhyArpfqk3H X-Received: by 2002:a05:6a20:7886:b0:19c:748a:303a with SMTP id d6-20020a056a20788600b0019c748a303amr4030758pzg.17.1706518863496; Mon, 29 Jan 2024 01:01:03 -0800 (PST) Received: from snowbird ([136.25.84.107]) by smtp.gmail.com with ESMTPSA id k28-20020aa7999c000000b006dbac48633bsm5359811pfh.189.2024.01.29.01.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 01:01:02 -0800 (PST) Date: Mon, 29 Jan 2024 01:01:00 -0800 From: Dennis Zhou To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: Fix wrong size passed to local_flush_tlb_range_asid() Message-ID: References: <20240123132730.2297719-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: <20240123132730.2297719-1-alexghiti@rivosinc.com> Hi Alexandre, On Tue, Jan 23, 2024 at 02:27:30PM +0100, Alexandre Ghiti wrote: > local_flush_tlb_range_asid() takes the size as argument, not the end of > the range to flush, so fix this by computing the size from the end and > the start of the range. > > Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()") > Signed-off-by: Alexandre Ghiti > --- > arch/riscv/mm/tlbflush.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c > index 8d12b26f5ac3..9619965f6501 100644 > --- a/arch/riscv/mm/tlbflush.c > +++ b/arch/riscv/mm/tlbflush.c > @@ -68,7 +68,7 @@ static inline void local_flush_tlb_range_asid(unsigned long start, > > void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) > { > - local_flush_tlb_range_asid(start, end, PAGE_SIZE, FLUSH_TLB_NO_ASID); > + local_flush_tlb_range_asid(start, end - start, PAGE_SIZE, FLUSH_TLB_NO_ASID); > } > > static void __ipi_flush_tlb_all(void *info) > -- > 2.39.2 > Sorry for the delay, I just pulled this into percpu#for-6.8-fixes. I'll send it to Linus this week. Thanks, Dennis