Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2072952rdb; Wed, 31 Jan 2024 19:45:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHf/LFn3m4zJm1ll4TQerXZwlbz4yY+rdTZgGtFdYKrV9vhJOskk7e1T9bWc/VjlzvHRew X-Received: by 2002:a2e:7c0e:0:b0:2cf:555f:1c6e with SMTP id x14-20020a2e7c0e000000b002cf555f1c6emr2321798ljc.23.1706759140379; Wed, 31 Jan 2024 19:45:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706759140; cv=pass; d=google.com; s=arc-20160816; b=tpG5Nzq5jpu+iOQoI2eceM3cQhY10sQ0Dp6Il96fNWchnouyv+L2wvNSZc4DhqxaLH F+qEBTIIirCH6oPkKBPt8kgLJ5npGVZBqN42lwCjryZzd76yC8HEoCX6TCkwT/R6hjX8 v3mrutEBbRSFrgWlDTRw8XIcjWHCxQ+Q6EIjIPbTdK5APzzpDvRRg+pV9x1lOCwWzmNh /D4VUxNcXRB+KCIFfYkLvGKSEVUVg0TWT2QkRqSIVzjNhjSbBUjTi9zwQL7PRhXJiRjG mjqv9HQSW1exvHxjsXXkHr8h4buxQFYrbHdteZF6P2sHo9/gMiu5oLYVTDyeSXMj5jeJ YKUQ== 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=AQXOa7LLPA5mB3r9PE/ky7/S4vcRmc/Br7XQyR94fo0=; fh=yi3gjXplNqlfGJMu6ODY/KDoiG9OgRCfOrfYGZ5eciE=; b=UoWvv8hvP6OGMRE2OmP3wW5hK0ewddgL7nfMNz+4GlZWnGXf/rxlC8Xq6GOQW/gUzS 4l7p+vLNeFK9uVroDbPYz0qiRwO2ZAaW4/E4FLHw+ghEMXNhQqguT1oU1PG12aBVDFWu N6lCOOKmuugsXF4yx+2JmE1UrDWFokm8DBiaU8BGqZExXiiXP6cJq+E9HFk8XahFPkq+ 6k/quYxxIsgaflVuP52l7ljzJQyE5pamb4VnDU66MOavkzd8/xlsFHBHeEkeKeNJ5pce bZog1oG4y4hEYBNXavJI3O2p3S8cbBgtjGzQBdWF9alPfQaXdwW5+YntUB5srQCshMb8 VKTQ==; dara=google.com 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-47590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVf8/ZYNDmEljpQbpJ09nEn4zSKpSfSh+GWjMb8j5Jl2n2LG23NgXPzVAznJS1ZaT593PmDuRXlXTZhZkP2QxrC6xApEbP7ORZyO6cnig== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n2-20020a056402514200b0055ec3228766si4926104edd.622.2024.01.31.19.45.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-47590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47590-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 181DD1F22420 for ; Thu, 1 Feb 2024 03:45:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D2973AC01; Thu, 1 Feb 2024 03:45:33 +0000 (UTC) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 B89B615E9C for ; Thu, 1 Feb 2024 03:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759133; cv=none; b=NBuGzef9Zc5aNVRlMIGYToMyihU7dw3GtaP+MQrd5RW05Dr4H6iqmKtZPbGzZuLZN1aD9/Rp5IwQIQbVRF/7GAka+TPQVE+kVU/TE3RDvZmZJYhxjm/22TOxJk9Y0klPJ0YHT5F2CPtH8ECe7MN59Byl8ZGCMQDWiyG6XWrba3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759133; c=relaxed/simple; bh=x3WIoSNADotrc9sqjymJkZO1f23pArUE6DC4hQ5aYRc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E/beBuOuDfvF0yvA+OyJ8eJ4e2ec9yUzhYudvZDEznMBk4tlOdfqmTwiMmIH/2N60dXEnc0Sx7SIL6Gsq1w0aGaRuVO2opOrxSYC4qiQdzSptqw02GPQYeH1133oxu9PRaYewmEOcoxLqkctCDfjA96AiGgwfT4oVJB7ibwp4q8= 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.214.181 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-pl1-f181.google.com with SMTP id d9443c01a7336-1d7393de183so3691325ad.3 for ; Wed, 31 Jan 2024 19:45:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706759131; x=1707363931; 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=AQXOa7LLPA5mB3r9PE/ky7/S4vcRmc/Br7XQyR94fo0=; b=eGUo8zZ4TL0bt+MvtfSm059Fv4K+2LMLfe/0VxDP2/NtO1hLJsBlLHOJCLt6ixMkiJ b9xC4gURiTKdu8HcQ7TFcxtV9jE0BNSGEkv2AxmO6qw1+h3Sl0vCT9C+bXWQNTFJInaY CMCRHLzIpyAjNOE/amhSYragCvMP+aiC8YicX4Z9DwqZF8WD+DQRJFGKa69k6FqbQ8cs fKMCiAscYDv35gbe+arz+FLO7wq7J477FcoCeFXvVW7iy1vWV04MDuewKY7bBc4jE6PP kaB4eCGbSL2tR2sNqFLRrxzMuQy8PyPKIaX+9GnbmV8OK3xV4zi4Av9m7zs7IU2ZznZV Z1hg== X-Gm-Message-State: AOJu0YyjK+pGdWWjAN1cl59bJQ1PA8dvBYkp2OXkCtMmWyRJHj2V413d /nqjI/3mwBEB5VgraC5ew/J/AElX0N2AVEfBlt3gtZ/FGjVFnMGF X-Received: by 2002:a17:902:c20b:b0:1d7:2311:8070 with SMTP id 11-20020a170902c20b00b001d723118070mr1020131pll.37.1706759130859; Wed, 31 Jan 2024 19:45:30 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWbTE23w+aY6SO58GQM8848CPSCeHcgtEIaYruFrAbBi6wGjLUR7fJ/+T1OngtW0R001QZ8GH14t+w8vukY/AXyPnljE6Ynym95EVRs+E8O02Ha89r+DVa4Q85QNYJMPW3sZiFtTX+4PlXHrWbEALoFyqIoOC9I8860+Z/E36HrtX4QyzgKea8HHBainUiwfY2C4j7u0yT9mE26IcMTOloypyKCw1zY7DaVA3qHHQh0UdKdx60= Received: from snowbird ([136.25.84.107]) by smtp.gmail.com with ESMTPSA id m3-20020a170902f20300b001d8f3c7fb96sm564524plc.166.2024.01.31.19.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:45:30 -0800 (PST) Date: Wed, 31 Jan 2024 19:45:27 -0800 From: Dennis Zhou To: Palmer Dabbelt Cc: alexghiti@rivosinc.com, Paul Walmsley , aou@eecs.berkeley.edu, geert@linux-m68k.org, 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: 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: Hi Palmer, On Wed, Jan 31, 2024 at 12:34:40PM -0800, Palmer Dabbelt wrote: > On Mon, 29 Jan 2024 01:01:00 PST (-0800), dennis@kernel.org wrote: > > 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. > > Do you mind if we do a shared tag or something? It's going to conflict with > https://lore.kernel.org/all/20240117140333.2479667-1-vincent.chen@sifive.com/ > . No big deal as it's a pretty trivial conflict, but they'll both need > stable backports. This alone won't need a stable backport, I merged the bug as part of enabling the percpu page allocator in the recent 6.8 merge window. That being said, this is the only patch I'm carrying for v6.8. I'm happy to drop it and have you pick it up instead. Saves me a tag and a PR. Lmk if that works for you. Thanks, Dennis