Message ID | 20240102220134.3229156-11-samuel.holland@sifive.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-14920-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4706809dyb; Tue, 2 Jan 2024 14:07:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZXQbB9KuC8BkK5ZHehGRLsHczvalzjEYlUvqTZvozaimvnnTevb7wsLwoGKSNhIcOq25o X-Received: by 2002:a17:906:10d1:b0:a27:ff1d:2d72 with SMTP id v17-20020a17090610d100b00a27ff1d2d72mr1794600ejv.90.1704233259727; Tue, 02 Jan 2024 14:07:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704233259; cv=none; d=google.com; s=arc-20160816; b=woplVphCTpV1Ut3M8nEv33IE8IprnpoEbUAI2xoK+UtVYFB6/HPS2VK1TaLTHJujV5 vkAqFIp/B/T+KhkUekNCcVOzqaBQVWVLBQ2gPxRcepkv/kKaHBEboFOaKDHeKiC000R8 eoGlYgxnQY2Hl253AHStDB+geZ/vsKRkvAADDiivDI+jl5Bl7qxGWY9hMwjscyF2GibU MhzPwnYT6nzUvn3/nsTMuSxPMYDS03vgZRd4esmKQ7TnNEZ357Yugw9kUUaZvnxPElGJ IcKwTOlRI0mCqv1Osn8wk4Yq4Kca5RKTjslNj+2mlGPqOcZ5M6hbb5PsHkYHa84FiqVy XoFg== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=O8uQuAx5HbeGrqX4Ip/qQY7nv6lrxw4qacCJFbpKbko=; fh=dlotjpk72cYcmDz0+AxIEXTz48ooVBc8lhZ+ndNwuOg=; b=FlojwujQvNxoRTzQVfrIJOgCsWHsQN1qDJgE313X4QGokGdzwCoIfTsvchIpV4w4zo yDelGB81639X2Xsid+eO+RKRCJvMzQBLBEzkjdT/QXZayGaZY0yJW6Jm3cfOY99yEIhS vGEWmeF2GhYZ+BBmt7sV+xzt21/8Gq2OrhWJaWfqOoTqGX7/V0ANfJY1ACrYQWRUDg2g YOM7OYGYrn10jLPT7Lsu8lbHgDrrUmHcN8mthpuEcPBNpWggnl2htsNSBe8tRuhzaSqL KpzIBrTaqUoiv+bqwV40PLmBJ8ZO2KwgqTDgoaE/NrDX79y/K2hzIl+TCfqMxPQtTrOc nVUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Fq3hbOFI; spf=pass (google.com: domain of linux-kernel+bounces-14920-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14920-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id wj6-20020a170907050600b00a2697f77293si10098174ejb.232.2024.01.02.14.07.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 14:07:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14920-ouuuleilei=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; dkim=pass header.i=@sifive.com header.s=google header.b=Fq3hbOFI; spf=pass (google.com: domain of linux-kernel+bounces-14920-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14920-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com 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 593901F234AF for <ouuuleilei@gmail.com>; Tue, 2 Jan 2024 22:07:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B77891A594; Tue, 2 Jan 2024 22:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="Fq3hbOFI" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 E7B6F199B3 for <linux-kernel@vger.kernel.org>; Tue, 2 Jan 2024 22:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-28bc7155755so3952305a91.2 for <linux-kernel@vger.kernel.org>; Tue, 02 Jan 2024 14:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1704232907; x=1704837707; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O8uQuAx5HbeGrqX4Ip/qQY7nv6lrxw4qacCJFbpKbko=; b=Fq3hbOFITwhrCF1xo3JKafxvDiY2hTS9MG3k7e4U6FsfOrftpP2sgWuYYotBePj36L r7sCj50iDICiKIuU1qwmr09yvMpY20VBxLYXG6yxBqvnvwQPjeC0V7wW6LpAEulpXfiE v3Rz8ObmvE59Bu3mCceu1lmwgUwSHxmcM3KheDBO2Bmz2pZ00PTqqqC/NBcNH2AGHXrt ND4lYHzancP0+KLfkwpx7ENF8Yp1DWN4O9hCWx2N3pse78IR1KJZszpuBAtog0GqQ1M9 IIHzSvnEP9FlF50k0LH9O7g8vqLSyjk/7xHMrW4TFcp5v9AsH5gaJ73h2GIzwZb6UHoj vzfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704232907; x=1704837707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O8uQuAx5HbeGrqX4Ip/qQY7nv6lrxw4qacCJFbpKbko=; b=aiYRk/sAsIbXlwN2X6acgr4GekvqfPejipnlsTraEbESE0JsuRhKjP0ZfgNPH2pLId JrkrBroK4KvwCSNpSBrQnZqYA87pR8VldWoNc2fLvmcSHwbjwZT1UgOxWYlOhCg55zpc AKFnPTLXuCopmurQVyTePWO49C6GkqsNWQteuJtntoRB3gwVHzoHQOGgmytlwe5LIx9w H2RfUP+3iZuc/eXehSonT98k13J/ezCNWZRavWpv+KLnYDePJO5TKZ6LNI+xtte113Gx XxtlAe7n53zjVhIauTU7UpQUwcuOt+AXAWMTpScjBtNX07uE8Vq4H3cpnQruOiE/CzDe b5oA== X-Gm-Message-State: AOJu0YwC0s7Hbc9S/XXeGyZTNRlbMZC3fMjmmPwJn6M40U5leNSMeRdm zPbu7CAwxVoD1RAW4bNWdS1sVjbfi1EiUkgbFEq0z2pD/Zs= X-Received: by 2002:a17:90b:33cc:b0:28a:f2cc:e008 with SMTP id lk12-20020a17090b33cc00b0028af2cce008mr6619129pjb.54.1704232907387; Tue, 02 Jan 2024 14:01:47 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id r59-20020a17090a43c100b0028ce507cd7dsm101724pjg.55.2024.01.02.14.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 14:01:47 -0800 (PST) From: Samuel Holland <samuel.holland@sifive.com> To: Palmer Dabbelt <palmer@dabbelt.com>, linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti <alexghiti@rivosinc.com>, Samuel Holland <samuel.holland@sifive.com> Subject: [PATCH v4 10/12] riscv: mm: Make asid_bits a local variable Date: Tue, 2 Jan 2024 14:00:47 -0800 Message-ID: <20240102220134.3229156-11-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240102220134.3229156-1-samuel.holland@sifive.com> References: <20240102220134.3229156-1-samuel.holland@sifive.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787018094525113801 X-GMAIL-MSGID: 1787018094525113801 |
Series |
riscv: ASID-related and UP-related TLB flush enhancements
|
|
Commit Message
Samuel Holland
Jan. 2, 2024, 10 p.m. UTC
This variable is only used inside asids_init().
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
(no changes since v1)
arch/riscv/mm/context.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
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 <samuel.holland@sifive.com> > --- > > (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
On Tue, Jan 2, 2024 at 11:01 PM Samuel Holland <samuel.holland@sifive.com> wrote: > > This variable is only used inside asids_init(). > > Signed-off-by: Samuel Holland <samuel.holland@sifive.com> > --- > > (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 > You can add: Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Thanks, Alex
On 2024-01-03 9:00 AM, Jisheng Zhang wrote: > 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. I'm not sure what you mean here. Patch 9 does not touch any references to the asid_bits variable, though it does touch adjacent lines. >> >> Signed-off-by: Samuel Holland <samuel.holland@sifive.com> >> --- >> >> (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
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);