From patchwork Wed Nov 22 01:07:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 168056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1022743vqb; Tue, 21 Nov 2023 17:09:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0YexfWRjLkQtf4nl/u7VndSyqWzlrv1jAVLIaf4XfBPu52lu0jyANk0vjcpvLSYE3EhpS X-Received: by 2002:a9d:7316:0:b0:6ce:30ce:3c94 with SMTP id e22-20020a9d7316000000b006ce30ce3c94mr1099501otk.4.1700615379488; Tue, 21 Nov 2023 17:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700615379; cv=none; d=google.com; s=arc-20160816; b=xLr4e4cucVVQXLT69vG1R+gDZDITvITugj8zmszO/bKmYR9gzYRsjbok59sBFqAVXk 2PHdNq4KdQAmktQa6LoPPC+sz/L6UKML/N1YImh3X26yOCMH1HDXzO3IL28NjOeOiPMw gCsNhrCEw/wahhAcP65Fn+5JlbAiCnzhfyAOYYyKgfm3evnrcZjKlxuZnW8kxgRTtkPm Sb3pJq1zoA30z2BxOiamdxO+zFX9q3gxn7+19tI8He/93BVq+q5Iq8PNBaZAGyzWk82d rxxFS6r0oaW2FLjytwJrHUfGw00nGHm3F8zE//aduTcgSmCgWfvLAy7GI1MqT5YJrjoc ihMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O8uQuAx5HbeGrqX4Ip/qQY7nv6lrxw4qacCJFbpKbko=; fh=dlotjpk72cYcmDz0+AxIEXTz48ooVBc8lhZ+ndNwuOg=; b=UMMAZ4jTg6zi6kaNpbxsvU9Y49aCwuYhVCcY9nnfjGM+L8J2mfbeVw+xZ6O3u1e2h7 H8j3dSkBFEcOUE71+2Y3EgJpAAZdSKkPKRfzO8iF1YgwdNNT88zHN9liqRxGnIKB4jab 6QSKyQ9EFdO28svEs1v1NLN79PMx2Q5aXTRpf9PHNynpu4mkh02b6cFpM+ED/jzvh156 sO8slIAjBpcBlSMoZ9k481nHOEPjRtdU7042sNoYI6Mmk1okbW5pPKUfCpwUQN3G3x56 JFTlZN/s22mn7FoYw5tR+AwK+Ti+s87BXoqEOVenij3Ex1Uzfrwm66xLrz1Xw52/3aL4 BPOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=nXz2QW8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id o2-20020a63fb02000000b005bdf596188asi10969833pgh.667.2023.11.21.17.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 17:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=nXz2QW8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2AA4580EAD5D; Tue, 21 Nov 2023 17:09:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343499AbjKVBIk (ORCPT + 99 others); Tue, 21 Nov 2023 20:08:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235031AbjKVBIa (ORCPT ); Tue, 21 Nov 2023 20:08:30 -0500 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0439D47 for ; Tue, 21 Nov 2023 17:08:25 -0800 (PST) Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6ce2eaf7c2bso3883743a34.0 for ; Tue, 21 Nov 2023 17:08:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1700615305; x=1701220105; 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=nXz2QW8m13PAMP28eJBbdowxNhob8TF/eJCZS1R2xO0VquNmNSxQv5NPcDTr5i1TPy 4WHRT7idnD58/grgstzYoKrqbP96c9gZWrvEgO7oxDYeAjSEo+MYOcxj9OFlvWXliAYm dIyH0yBKAEhngtl5MEGBTwWc1kbH2XtSs/59IlPV7AmfSU30NVkbkBtBNJ46wxCkuEo9 UkYn54jCqiPkVeYiVv5jzLLjH8vi0CI/qnnr+Bs+f2nYdO4YlpbWc55TQ1+x47Ainhpm 1RlqdtJyurK8DQsuO6t2ETeDGom3rSzlQPYYwIz4v5VU14Fn24eqAK1I+NTivu+BD8KR KsWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700615305; x=1701220105; 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=OXsADn7ndgpc6XsEQmTrduJTWYIEWV+H7fcwpf0EnoRsPQklrw0yZQxoBWwrHhjfb2 84bI+AJt25mnJ/nBATcawlNLrPx629Q9AhyYiQcNrq3peM8yfXFiF8/eXCyC6+frbtJP XATYclOHhTOc3z3ISip5YrIaxU9U6vtSBXRD3egZ7xDT8dk1wJWxI0Dig61DELKHTZie epPzfUgSpMtkOmpAQCK6n4NoKr97HwsU+5XewPkSvJqO5vyczTeoMUk1puJKCjhe6ayP FqUnWvyis4uzWtiGRUjhsZvcg6yAm+xt/R6eH6eNTrRwhEcWyCj2b8bb3NAWN9yYYo5n YDvw== X-Gm-Message-State: AOJu0YwpZLzFf8gfwyZE6WYuN/bqOEr+BjXy9DraowP5riyxRzYvtlII b0/FeKBFZ4qJ3Bh4iElrhZq2AQ== X-Received: by 2002:a05:6870:9b0c:b0:1f5:b5ca:435e with SMTP id hq12-20020a0568709b0c00b001f5b5ca435emr1104182oab.52.1700615304951; Tue, 21 Nov 2023 17:08:24 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id bn5-20020a056a00324500b006be047268d5sm8713961pfb.174.2023.11.21.17.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 17:08: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 , Samuel Holland Subject: [PATCH v3 6/8] riscv: mm: Make asid_bits a local variable Date: Tue, 21 Nov 2023 17:07:17 -0800 Message-ID: <20231122010815.3545294-7-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231122010815.3545294-1-samuel.holland@sifive.com> References: <20231122010815.3545294-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 17:09:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783224471641021982 X-GMAIL-MSGID: 1783224471641021982 This variable is only used inside asids_init(). 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);