Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7181454rdb; Wed, 3 Jan 2024 07:13:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3/F+ZkeHm6VOOIJBMcIf0Gha9bc/GBfTg06NZx3+aVNWS8lhYq7+SwFr9pqDTZFM0kWVJ X-Received: by 2002:a17:902:e541:b0:1d3:d194:3563 with SMTP id n1-20020a170902e54100b001d3d1943563mr24926875plf.60.1704294803241; Wed, 03 Jan 2024 07:13:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704294803; cv=none; d=google.com; s=arc-20160816; b=LqLYb/FTY9M2N4i/4nTpHQfk+WcG+OeRg6eatzdwJVgJGlb2AhVFRlQSomdNABTbin QB3HPmC14LS2l/OZ7UePxqFTe6JOkqANRyJcTtEOxGkMoB27uI35IT10h0O/Sc85ZQg4 DfPjA/cHUHTfSAlhUonCsD20kPNAct/omQ5EgyWkA9KQd8yLwgTid+ZlyvzUU4VWUPQB bg6mX/bwClRj0nAIIF7t67O4sGyih96azGkwe4v0IvlZaAeIsaM4OVnOsubrSkpcqW+p bCfAA+qpRS08RgrjhJoht0OxV22pv3qzv1kN30E7tHG6vuU+Kp5CqFJ8LB9x2odJ636z EB2w== ARC-Message-Signature: i=1; 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=twsdX/8Iak/pOeBhZ4mb5owadV0YiToeILd1lP47bt0=; fh=lXRNZPPD/vB2l4adEnq1JQWLoznnU3nAIf33OLw1uzM=; b=WmSRoVWcoZ2NRjs4d8pq8A7U+hW6iBK7bx8rFXCTLJ6L39V7DPi6YTBkcj4mMP/Fkc ZGsM/XRi3Gg2AWs/8Gfr5Mhly3oepTPafOX67jZxzT4ZH+b/Yc2PTpplWaTCH98q/WW2 bdGyH4iEmrTOUxv7bnDYHrQef5gSPWKOdjWUytjHF3sC8g3FdWOTPxe0B+MD8zIcFe2L SLeF0TErMjcdrddKna1n97WKe0ujmmC7KIP+KtwWModeYKO87ECGNjhvFCrDKzSLwHK+ rPtXXmFVHs6R60o3UQd+NmlGoHYstf96pA0f/cEJu/VC9fd4JwGpk7k/kFTRmrKk/QVu 8EFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h3TJTsC8; spf=pass (google.com: domain of linux-kernel+bounces-15684-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15684-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. [139.178.88.99]) by mx.google.com with ESMTPS id s16-20020a170902989000b001d43e87d479si10056912plp.446.2024.01.03.07.13.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 07:13:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15684-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=@kernel.org header.s=k20201202 header.b=h3TJTsC8; spf=pass (google.com: domain of linux-kernel+bounces-15684-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15684-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 E98F928595F for ; Wed, 3 Jan 2024 15:13:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 682681B292; Wed, 3 Jan 2024 15:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h3TJTsC8" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0CBF1B286 for ; Wed, 3 Jan 2024 15:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3C9DC433C8; Wed, 3 Jan 2024 15:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704294783; bh=QX+nMwXVzn0gGxlE1K2IkvWpvmG5/KS1sk6RCZ0yiIY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h3TJTsC8iSmtmbvbPqzz3uRI6cNoJFiZq0ejCKH357+uluHEWBWnFIvZH/LsmU50J 5CTshTIDIkC36IeAp5RKK+zyw42DrsEU1LXXy90j1nn1mR4R3ObVyCeaLieOIgcABt /d5hFyGgkDUyn+KUh2LFSO1DBEjj89Plug9yiEM5dDvV11IdUoiONSPDrFroAVW8XG zfFvVfhQyorewe+y17GRIh2aowzfRCxdh4pi7R+MLhn9Vsr9G37uXCQxoKw2ENAQeb zO2UoMrT5gdhC+9fw+SN2ufKi2iVG33g2EZ2h5l9eU90wHyvZRSn1qBiS5IU9QKlbJ ebY6TXHOBtAuw== Date: Wed, 3 Jan 2024 23:00:20 +0800 From: Jisheng Zhang To: Samuel Holland Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti Subject: Re: [PATCH v4 10/12] riscv: mm: Make asid_bits a local variable Message-ID: References: <20240102220134.3229156-1-samuel.holland@sifive.com> <20240102220134.3229156-11-samuel.holland@sifive.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=utf-8 Content-Disposition: inline In-Reply-To: <20240102220134.3229156-11-samuel.holland@sifive.com> On Tue, Jan 02, 2024 at 02:00:47PM -0800, Samuel Holland wrote: > This variable is only used inside asids_init(). This is due to patch9, so can be folded into patch9. > > Signed-off-by: Samuel Holland > --- > > (no changes since v1) > > arch/riscv/mm/context.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c > index b5170ac1b742..43a8bc2d5af4 100644 > --- a/arch/riscv/mm/context.c > +++ b/arch/riscv/mm/context.c > @@ -20,7 +20,6 @@ > > DEFINE_STATIC_KEY_FALSE(use_asid_allocator); > > -static unsigned long asid_bits; > static unsigned long num_asids; > > static atomic_long_t current_version; > @@ -226,7 +225,7 @@ static inline void set_mm(struct mm_struct *prev, > > static int __init asids_init(void) > { > - unsigned long old; > + unsigned long asid_bits, old; > > /* Figure-out number of ASID bits in HW */ > old = csr_read(CSR_SATP); > -- > 2.42.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv