Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp78349lqe; Tue, 26 Mar 2024 21:53:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGFu/1J2C3Dg40NABzRUCZELIIOfgcU1ABi76XCihVxvQ56+nNBWZpXqQ7Obz/Sfk15jFR2QVDyLVePs8HCVtErL3F048Lq8dflXGGZQ== X-Google-Smtp-Source: AGHT+IHsLFOckJO6BhjDZBnq2AoztfHyXP2A5m6YRYLe6zDvnk3yqbrmoplPmd4E9kL8H/mhALwK X-Received: by 2002:a17:902:da92:b0:1e0:e236:fe36 with SMTP id j18-20020a170902da9200b001e0e236fe36mr2215263plx.6.1711515216086; Tue, 26 Mar 2024 21:53:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711515216; cv=pass; d=google.com; s=arc-20160816; b=F0+Egy/fW6V0lFQ1sTDg/DhjJ2THhnHgm6gNqulnQWAIAnAqzPntEuT28RLvjAvPJb MLvqMMRz+TP8EpgAQ79q3rYlD7sf27+WMNeNVzz+39jVJUr9D91vx/gYtxI1D5GthR50 g9O8smWkx5/6yJYTCXhv9QKVdMpM0lN++3UaR/Y/3OtDcU7cj9VvOt75Qx5Md89R0YeF H2fVepXG+hglhXeN0bPOfifStYe0FSCrW5sjBBrbHjaplkWoRgl5U4z8KJ5WLKhrIA8H 5VYL2dTIJn0DqNvl5iYwNEA31yLloV36Xdtor+4c6ZSJQz9YZHaVBY8rcw5drv4WrnQm gdeg== 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=oxC/twE0tD7yUyjHcS0aNFFJWzSJKc4/r5d1jj9fqyW21xuYlqVaoQD8tKC4H34AaD lkUb5iJvoz02GWrASSMxtHpZwg0hxxaJHel1Y5RmYORJXRsLVQY8jPf3BTcwJ0dwrnl8 CXqFaYpaUNQz5XkM3bRCtCKQ/2iAV0nWAu3S963KlXKEbSe3RqU62ueVmzUjQL1CGgI1 P/QDgghSNaMGY7GMccUhFpC10zTknilek+hDhgWHW2uhpFcVXBEj0XPJ7SWExJzwfo4J aR9CTx5O2g3VwROLIAHJYveM6vggom+SgIPLDr7DRiAxQhg1+vD68o1rMe/dXabbpski zKEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=GFoncGkd; 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-120314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120314-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 v20-20020a170902d09400b001e09507cbeasi8297041plv.258.2024.03.26.21.53.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 21:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120314-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=GFoncGkd; 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-120314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120314-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 6133AB22E04 for ; Wed, 27 Mar 2024 04:52:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 803AC2C1B5; Wed, 27 Mar 2024 04:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="GFoncGkd" Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 143A88836 for ; Wed, 27 Mar 2024 04:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711515061; cv=none; b=ZJpbDji8sK4U3HbBYg2tr3I1SmvzOsrsUnLmCPg8fC2Lsqfb8mKQumBc+xglUQK+RszlkuKX+XGgNltFdpUjShEmfzelabaeDNQvSiqkrg73w3o1KNNdl4wMfGym3Q7axxKgg4rZ0alJbenX9YazfAQNIUzp9DPNTqnzLLUpUrw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711515061; c=relaxed/simple; bh=G1BXM2z6rQBc5K4wZw4N6I/e+joRY7yH/Z0Jdaxm+no=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QlHl7lyQJdNKb4vTzuk0qNylAC8tUaArTX4+btn/+feoOUHBQeemTuMxw0i+twEMmM+qLvypKWlYaIWB02iZE9VMJPtccIWS/vUGtpHyvc3lo1B7+dAGeTBizS4uR2j7oz621cSvnlFeM2bRVIvLb6puxv8KXWYtRGRQ4azQXe0= 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=GFoncGkd; arc=none smtp.client-ip=209.85.161.50 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-oo1-f50.google.com with SMTP id 006d021491bc7-5a1b6800ba8so2230312eaf.0 for ; Tue, 26 Mar 2024 21:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711515059; x=1712119859; 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=GFoncGkd4CnXjWpR6dZgceUdNTns+EkWUxgW1bzfHBUz6IYFilVgPq8ZuRAsiKohEN QKK9q8ehr/sXYPBNqXHwAsEm9BEuYFFBLxrN1Fe5HOM9OeKdt3MmGY0R0JmM93f6nxfx 0AE0eQi0+UrnJa+TRSxIpKXNlrU4XSTw9n1lYCZkw2nDrP2ZDWAU+4UTwYn7ybN1PWKF JS98FZhB+JkRiKeUc2fGOK2VtNm+x896G3z5KQmYGUjFKzFJvW3w9/RMOxwOk53mneoS 2sG8yhZDtds9lhwB0Kb8yBB3XLqurR+N2y3wVtUQnuV4In3RYGeFu+7X/5evOtOB8r/a 5mTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711515059; x=1712119859; 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=qA+e7v4NelTjykLAvg2w6HzscsH0D+VjpfFMUdqlL7V37G2lu01JZU0OFKDtIx5uS8 fMjfr41zXqGsse+Fylso+7P17CiPtEYVxAMZ6bC1qZhZfemrW0lar2xWt8M9/t9T7zDp JF8+tVIyRlv692wZhjMtuj+GF61uhWkb0Qdu9jLHsHspOhx7P7wUeJrsOoY4Pktcbfl6 7DCD9VHgAc6h7NGlnc0T9WrWXdBfGt1Rsog/dGZqI5Mrc0zm1QzndycEKy9NPnehkxEY EXiyAiG3AJD1YwoGsyv+NuvcTaEjK2f2waYMWcXwQw0ujFiPAt8f376W0/1oes4aM2LA da1Q== X-Gm-Message-State: AOJu0YybpLHMQ3xR/XbLdojXz13dQrX/VuQ724eooraRMhxXUT2sWQHP OK+feMLAIYkopULyauVPGJ0qGBUOoHjU7/gsNqhGDGa1pftAJOsixfWE3RnpzDc= X-Received: by 2002:a05:6358:320c:b0:17e:bb52:927f with SMTP id a12-20020a056358320c00b0017ebb52927fmr1922247rwe.1.1711515059146; Tue, 26 Mar 2024 21:50:59 -0700 (PDT) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id e31-20020a63501f000000b005e4666261besm8351500pgb.50.2024.03.26.21.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 21:50:58 -0700 (PDT) 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 v6 11/13] riscv: mm: Make asid_bits a local variable Date: Tue, 26 Mar 2024 21:49:52 -0700 Message-ID: <20240327045035.368512-12-samuel.holland@sifive.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240327045035.368512-1-samuel.holland@sifive.com> References: <20240327045035.368512-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