Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp215126lqc; Thu, 29 Feb 2024 15:25:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWS3hqSjN5+FkiD0wfug1+QyBbdJwpATqmxcED2uus4jV6DCH/ZUkcZC13VdA6s6wqTz11t4qAluWHbSXdl5MKMd7KsFdFuxqQeudny+g== X-Google-Smtp-Source: AGHT+IEk8glPgamVUiS9NJltZEyBEH6uMhUNH3FTKfe6m0YjTnddulwXfRMgxAns0jYFV7BHaZVW X-Received: by 2002:a17:903:298b:b0:1dc:3261:ab7 with SMTP id lm11-20020a170903298b00b001dc32610ab7mr4238725plb.49.1709249132740; Thu, 29 Feb 2024 15:25:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709249132; cv=pass; d=google.com; s=arc-20160816; b=FZMLmJhiTw8F2w8qaw500kRaCjdVMwrnWR0qWSqlXRWchufqZ97i0BL3UxibNdS6KQ rJ3bHMV6Vau9SK4gFBMG7iSgFoWZEKuAOf4yztyhHrpUW62Q7wDVGw+a/W/+gr/4neI4 lDV44C2/jqZ2CWkOG6U6+DzjpQDfKRUDs2jFmBTiWC6QeIUsiy1epqg/EYP6KkUL9lHP 0L2GCCfsSmr5APfdp8Iq2trqKCJ7pZ3u+zQkCj2rtpxT3LOmLupuzSnPYd0LHgQSwvZy tzEBkfK86ZInsJz3NjExETVhBhiQAd8xppuYmS4UCy/rtoXBpQ4xKBx5oUvjxjW+QmCw Z8fA== ARC-Message-Signature: i=2; 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=4wFLc5gcnBs285NRnicKVmmQVV53EnA/2rANcUM2uCA=; fh=kVMl8kfpA36Ro/3P2bM4CdBKxR/FbbKq3UwoDY1wFDQ=; b=XCvu+k2TIE4Gg6my5BoFQFrygB5eULyiUqjHS3xH0JSbiyd/jdVpoyaNKNIeyYGSLZ 6FdgQBFZ2WZIl6nlRSVyEZFDfKrDidVyMO8TX0g+yFk6nsjlfOj1cGTm5+3I/0DnqrLK t/sHB16CEXSkLECGGgvXYM9CGS41CB7vRXpAtCf0Cc6ePij0/yhqbbtxGYss+hleb4ah IfDWOVELzdei2/TTvWpEoVc5nNNLqHOmG4ypaMt8zlAzxKjApnA5KW4iyP4yKZw9RziO 2XpYrYeigXlnwZjLf+jx0TjFDHd02gBliiOkKXnraAzbKxMIH/Rynu8ku+dWSAwUzpla pHTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=gLPBsPMW; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-87682-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87682-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p5-20020a170902780500b001db3613aacbsi2107115pll.617.2024.02.29.15.25.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:25:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87682-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=gLPBsPMW; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-87682-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87682-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2A278B22B23 for ; Thu, 29 Feb 2024 23:24:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA9F614601F; Thu, 29 Feb 2024 23:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="gLPBsPMW" Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 768BC74BFE for ; Thu, 29 Feb 2024 23:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709248946; cv=none; b=RrUJKFnjCQTjklwy7TH3bBJCJjy01Vkpie6jHcDiF/8Y0K2gXIWNyrFQuB/pwdFDDgFduBXS3Y9Eur0nXnxAgQ8SJzsZd4KbhFc13Vszf2eMZMuR46DAzdVZ+GgNfRGAfLuD5eB1a5hz7YxpL4sL5DRVtXU70VNfTlou90jSODg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709248946; c=relaxed/simple; bh=G1BXM2z6rQBc5K4wZw4N6I/e+joRY7yH/Z0Jdaxm+no=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DgxFmdpuIO+eFqXlFlrSUm9UHNSJex7e9vw4juT0QICltwsr7BDjKs5yNoYS5OLz1IqdKv0xKYpVpT4pQi1tehIPcNF42xDeymVtnVz2y2+FMVjxvA/OjhpysmOlAV0pTGC3rInMrGshY3K5D/T2bas2w7cg/8LUKca1JV8CRzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=gLPBsPMW; arc=none smtp.client-ip=209.85.210.170 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-pf1-f170.google.com with SMTP id d2e1a72fcca58-6e55bb75c9eso1336260b3a.3 for ; Thu, 29 Feb 2024 15:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1709248945; x=1709853745; 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=4wFLc5gcnBs285NRnicKVmmQVV53EnA/2rANcUM2uCA=; b=gLPBsPMW5tbj3NNZa7yyp9h+BFyIBw958P3oU791RdPlMGHM6i9bHaDXg9MjJQwH8h B+9Um0TXzck7yUGL2G6fMNG+GXID+epbq1SDC5PlO0DQpG3scIxABxZIVUI6c90mUd/I HFJ67HfX1QSZgxgDASlbHuVyj6tE6TTpLkhT0KJ9a71tmeLcn2vz5H3xrxj/7Xj/3NBR sON03IgHbXlNJUtrZk+aWESptb5RIbQkPObsJ1tAQHejb2VjaKjO7BV3Swaz8xW2ZjmD YqFkf6jY/GqZDGHyB4r9/9NuwfPKM0ZB0mL84hxVWbZDCgE3nMeIqn8RPA6l6cgIBNm5 jJvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709248945; x=1709853745; 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=4wFLc5gcnBs285NRnicKVmmQVV53EnA/2rANcUM2uCA=; b=wkfv1j3MkB1ZL3M/nxe2es6ls7VD90/PI56q17aESviCqa3i0mchRBshxw9UbR+2qs XzY1gBCcrbDHjaP7pgySo+1sv5Oi5ZqnGBDg9RsprUlBymVdLgO9RkxTyhS42nXILaQh aFtwpOURs1Nxc4flXQxRUsReoUomnHAb+l+NtDWBm8W5zY4/gnTszQVwK36dgZa5JYpJ 0tom+AWvAK+0u239eiA8X3Zv+tloS4XvFNrZqG2kyeDIQhqROJTbmtuRLrg1+fVzhLrk a5LoUyH7dBgrxENo/FB8bw6Fgl66LgaQ3TirZLckkYkJlCC+3WI4MYf6D3LDkbj7DiUk 7Z1Q== X-Gm-Message-State: AOJu0Yw7QqCzI91rJM+y/6gSXh9HXdGJK4IL4o5Uq6xv2NS+ExRBrt7l 83SLi3+LbsBiS2KcYVxM5aVQ/dYn7jT3ngiE9sdtq9o+0Ggp79Xn2eFtRa9pOHA= X-Received: by 2002:a05:6a00:3d42:b0:6e4:eee0:5798 with SMTP id lp2-20020a056a003d4200b006e4eee05798mr179957pfb.14.1709248944849; Thu, 29 Feb 2024 15:22:24 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id c6-20020aa78806000000b006e55aa75d6csm1779719pfo.122.2024.02.29.15.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:22:24 -0800 (PST) From: Samuel Holland To: Palmer Dabbelt , linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti , Jisheng Zhang , Yunhui Cui , Samuel Holland Subject: [PATCH v5 11/13] riscv: mm: Make asid_bits a local variable Date: Thu, 29 Feb 2024 15:21:52 -0800 Message-ID: <20240229232211.161961-12-samuel.holland@sifive.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240229232211.161961-1-samuel.holland@sifive.com> References: <20240229232211.161961-1-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-Transfer-Encoding: 8bit This variable is only used inside asids_init(). Reviewed-by: Alexandre Ghiti 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 5315af06cd4d..0bf6d0070a14 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.43.1