From patchwork Thu Feb 29 23:21:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13577716 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C526C54798 for ; Thu, 29 Feb 2024 23:22:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 333EB6B00A4; Thu, 29 Feb 2024 18:22:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 21F13940007; Thu, 29 Feb 2024 18:22:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3B776B00A6; Thu, 29 Feb 2024 18:22:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DD63E6B00A4 for ; Thu, 29 Feb 2024 18:22:27 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A979CA150F for ; Thu, 29 Feb 2024 23:22:27 +0000 (UTC) X-FDA: 81846417534.17.64E27BF Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf13.hostedemail.com (Postfix) with ESMTP id D92B720023 for ; Thu, 29 Feb 2024 23:22:25 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=sifive.com header.s=google header.b=TtrUygqN; dmarc=pass (policy=reject) header.from=sifive.com; spf=pass (imf13.hostedemail.com: domain of samuel.holland@sifive.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=samuel.holland@sifive.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709248945; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4wFLc5gcnBs285NRnicKVmmQVV53EnA/2rANcUM2uCA=; b=apzyWXXjs/KkrrVNs2LDCt+HJBFM64Tc+ltRFp7A9rzMRzDfL7xpF/5uJ2KBkbfQPAta+O GT955v74tF0d0YirnnAqFN0jWo+Z1elDMOK3ZlvPM/yim8Mgx3LHrYfqn4hCz9TIkN9EXU s1xEaHtUwb/e4yW2Kqku6TOHiCrhyF4= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=sifive.com header.s=google header.b=TtrUygqN; dmarc=pass (policy=reject) header.from=sifive.com; spf=pass (imf13.hostedemail.com: domain of samuel.holland@sifive.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=samuel.holland@sifive.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709248946; a=rsa-sha256; cv=none; b=wUKFbDQnAaP2078UGBBM728n4eIa9mDF7DdsBTK5PUk+gxB11Yy57XeRGUuld14VN0Tac3 MaQBG/Xv6CZkusH+aEmbXjZJgsgbnyj4c6bO/FJmSwcYquY7a55pmnDJ84/fCZYETgANgi 7unKZI7pkusnNHXvimW3P4QbrvnvpaM= Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6e4d48a5823so1324395b3a.1 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=kvack.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=TtrUygqNWZ1rmdU0qJeXKlS0N5ZyazoMJEq9ukCYmHrSZpw6Gxmlbu/2kg2PAYuF7u MVpRGbp20jOQJhxKJQL5Ku423A0OoV9EiASqZbNz2VmRW3ITtEDBVx7i2L0LgVItwQJO woWQYSdN023p0k++v/sh9ebYLJN3ipZzgD6PYUjjFyFbwDTuH7DHspatP8GF15JjuK72 ADOoPX/p6wi6MqIKO+YRiTCX/hNX5hhmOyWDtLiRrWNJU2UpaUVryBtxno/vup34X69/ KX3tG++VCAVins3dP4NFXYaf+ZEFDfvgJZLJQYm0U2saEw+a+0koE2WSV4U53Gcmi5SG PJlQ== 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=PleEr2eR83NEzE+EApCD6crF2lCW69Pa+sVCeNldIckfEnF7dErw9oLvPwyRkLhPGf wCjZBBaoz0Fcrq70RR/nCXw1ZlnhUfn6NiaktUTn16wHVDCYwvYNREL5WVJ9nOjJn8et xcq2ry/pJYCEYMzx5V0h2sjmX/FGV4ZV95PZ6dgmpNW8xy4wWOh/tJ17F2QFAf6drPGS 76kkoJb6/t+6cDr2s5wkVaGyT497ZQXteo/CEDslI8Kt8bYJqPBArV4r7BSv8fHVK8wz tLrN6t+vhHwUFbNfulj//SQGKXXXGs6ni2o1NvnMvht+IN3ygbri5fAisxGnYAZF+MPD vJzw== X-Forwarded-Encrypted: i=1; AJvYcCWZ7JBMqlyNaiQurQPGFUYWlsnBagKi+rRSQ1MTOw5pdSDaw/qoiEBzQUTFrllgsv/bkrX6/qqy548XMhBp0y6QOW0= X-Gm-Message-State: AOJu0YzEGF8u7z31Qx9TgQexy1GiuPOvcRGmghzNuKmgYqvPeUGNxdnu kR0G3YgFGKlOSB1/00KZmn4BHppGyLAsO6qRCjnrwBzcZnXTEMZwU2kvDD6LY5E= X-Google-Smtp-Source: AGHT+IHQJB+ROn7vFDGIQNWMDCSQS4WpsKXvgO9ytwgYp+s+V0Upk9jrJAXqE3yMlwAjPHhZUdgCcg== 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> MIME-Version: 1.0 X-Rspamd-Queue-Id: D92B720023 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: m7513s4ta95zemffr6nc8gw3npgxy9fp X-HE-Tag: 1709248945-562721 X-HE-Meta: U2FsdGVkX1+LNKzCvxq71lsQ+XTApnTb0p3NCD3TNm8rLmPX0yOCdu3DtsTyGOS150wuuLZTnVnjxoBGQmbxgeqHKU2cFb6EoQyz/cgh8V5tc1YWu6jkHVkCgXuwXGGlnCOQChakA9iX7MLJrk796QX6ZKk3OmU8wpA08GpLkRmSdL/0qx+x9C6ExsAcnFX7yKPbAc8D9w2bEyfxU90UH/3C1U045K7Bh2eUKY3yMYxF7Zs1kpQr6WGuyZ3XrcUdsrxXDzispGEFgNAc2X5CDoiJPeVhWQp1iaP1clnyjQZf3/cCLYmwdjO9NMvHPgVWEaH8CqKUJyCIcu7O2fWz8YWHgDXBMWYLuDq9e4omS5KNdhLmoj9nTC2eOJLNAE1RvS90N4DfyyV7/vaBISaVx6JbXOF3FDB1SB0yo76eYa8KLVNqR9rQOJEdp7/6Q35ft0bWpWGCSf07KU9rmldm8WdSJnqLeL+yCP0y0+8GaARwkLrP/ekT7MqDfyPCrjaxLtMMehyYpZl1DUA4yeiGRn6R2bNkztjwaeDU3vJKO1j3OzW2+1qm1V7fUBQQA0jlw5puEbgIPyC820vX9YaJ2CGNEbZAtwlA8rhjRCbUsvXkcxbwf/37zeVKBiFCqwk2qyHPCjaPZEKCSWYLwemmSInrsKG38w3DMe/1UDsy7tuzVZjSWCKk7Ix8HudNylORiTVp/L8jZ+/QW5JwnPLZyC0T4z8h9V3zVdghvy9QKSAvty5zgOwHKDWLV57Wtvra+QGRR6ybo13yRYXF5donWnw+2moaOGGRZNtJRkKlOuuylsBtypTQeXaNLddtFc98NAYd8k6hc+IgXthBIdCJeRd2rzZKEc6JiDIKT/m+P3OHI5TzHkdtfKlSWf97+070EgVXlUsBKWkjBpiHX4iCa+7/vvHOMw46wodrq6qTKvknoTivp9vSiqZNElgyFNcOf25Uqb0GV+u9IE+v7Fx DpyIplEn 87Z18SI7ZHRz0kLPK+jZv2F7SBE710kpOT8dLMugZicKr9EFkjD2tTwFpAj+gDBRKBatTEy7gfjq+9EJFkAHDj35m64wJpIOuAWhGktUJ4hFx2iPEpmZYnTFE6h93o70YH5QV6eUjvv+ND69EcJaL36JAH70t9cDaAPDP X-Bogosity: Ham, tests=bogofilter, spamicity=0.022934, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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);