Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7790158rdb; Thu, 4 Jan 2024 07:49:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1np07dtZoZPO7UAqEJugJw16MpN3X2S0EzCQMdcNzWL1CLL0MYcvKXzPwQFS7cRopwKdc X-Received: by 2002:a17:902:db0a:b0:1d4:1999:d9ac with SMTP id m10-20020a170902db0a00b001d41999d9acmr724037plx.94.1704383379189; Thu, 04 Jan 2024 07:49:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704383379; cv=none; d=google.com; s=arc-20160816; b=Tk3LDTqn24xxjLqixKNtX6R3i97qTluW0lk5kXy311nNp87zyR1j1EsVJWVlUJRRof pZ5I/zOlXwZvgVyXZmoaQL+66Q/D5WI4U7BxSsK4rBls0yOXp2l75HZJXXKqkGah6wwg hA4lox3wXmr0GEpSozcd8OJnOor74dxYiEAttKK3Dj3o5J/yV6Yx2w9qj6ZPXC+KsNwv ydwZ4lkL+Mv0JsMO35mJleoI9fIPAp15w/fGui96Aine39kivGs00XL6xr/8rM091lG9 30uyuCEStTLTzX6V8N78E/dWKWyEG6A/nYjwyTNjVKmAn5mAFg3G+mjQamLFCDoWXA13 0YPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7TIDLSdpMStFIDjtZ3v/tdAZRRwjQGD+NRWYb5ITqWs=; fh=gTcM6/KWjw8syMHr9ZShAxtpToSuB9qBohNO1oFyylY=; b=Xni1gUV53rtYkgpVFjY024CQlM9akeRgIYG0A6pCe0mAUhhZD0jRz7GtLliTGk+CtN a8JqqAeGn7t6hEZZ2w1VM2jP6S56TB1OpRv3c67bQxbkcBEDHExBldm4S5wtVfXw9h7E g8SQItgQfZpeeTdwxQv6LtTq4RZFAYLtktqE9okaKSt1CbuPjtob7vqz57eCv/HjnifP hO1u3ldSpviOs2WMEj3JwSQN+A7Y9gJ9HHPdFOSZAarYN0GbHYH927q35SCqcyG5JDMv dsC7715KVwc+6jwwB7e8ZoQAdVFxyaLau0Xta7hPm57Es8AkjwlzFBLhtiJciwB0kgOG 8Ewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HTDRe7lm; spf=pass (google.com: domain of linux-kernel+bounces-16883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b1-20020a170902d30100b001d4e28d88easi321389plc.576.2024.01.04.07.49.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 07:49:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HTDRe7lm; spf=pass (google.com: domain of linux-kernel+bounces-16883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16883-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D5713287571 for ; Thu, 4 Jan 2024 15:49:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55D92249FF; Thu, 4 Jan 2024 15:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="HTDRe7lm" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (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 0919E24217 for ; Thu, 4 Jan 2024 15:49:18 +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-io1-f52.google.com with SMTP id ca18e2360f4ac-7b7fdde8b26so24888239f.1 for ; Thu, 04 Jan 2024 07:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1704383358; x=1704988158; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7TIDLSdpMStFIDjtZ3v/tdAZRRwjQGD+NRWYb5ITqWs=; b=HTDRe7lm2WqfBap/sJTGQv3MDFuyGuTHB2mwsFGbSG7+Y0+Y67/CVJ333bh+sgJnRa /XM+dvmD0e6cs5UCfuD5mH1s+fGAgTZMw7U6pvnEMCG0bdMsKR1vMbedddeonH8ZBZLz v890DERnoml2GjvvjmHpacYOPvxmpMlePU9OvOqD9YhNGTXdUbTLHtkJbSju6tRrC/UR QU3TyY97E7OpYBQnKfStVHQROC2CCa79WXwpySuUZKVQLkFn+RKrBDsOly85xn0Copb0 tbXGy6pApGbAckcmJik0qJr8oXkekCKNjYDmSh7jq9he51tRIrG61pOfgUXQt3TLKbpR 1W9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704383358; x=1704988158; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7TIDLSdpMStFIDjtZ3v/tdAZRRwjQGD+NRWYb5ITqWs=; b=U9SprjDT6I0vgKvCt4+edPTy6G+aUJXdYqQx44XBZO0KfkB6gUsP9tuSBMxYeiCMOj eY4tOhWI9gcCi5sV3aPvK3e4H3fWe5U3Qb72hIOGTCVHqujbp+TmWLiIauGk4P0qvU85 pqSxQ8CoPNDwgaOBKcwSddHHdh3l9WUktZDqtT0Ax+8Oz09/DrmyD+YQwHLw6280qg8W FXWXZhbo+QiodwjZMZz+2GFdyAszB5uzC/82jEfkbESMalL2JR3kEFKC5vKH8aqDfG/p 5b6UQZaJrPxv1VYAFPmFKLh2OKCwihLgSa8QQqkadgdJSIFF/VDO5Fb4OhsD/q3OwYs+ oLug== X-Gm-Message-State: AOJu0Yx7NbSSa2TTZQmxAxQKQEbfB2ECw1RKD2VwLb1cS5Ntsp3vZqBV Ue+6hutkd4XNMxlYdBklRjLQqhhQ+kLW3RiixA57HiyKb1w= X-Received: by 2002:a6b:e915:0:b0:7ba:85e4:f8de with SMTP id u21-20020a6be915000000b007ba85e4f8demr732625iof.42.1704383358130; Thu, 04 Jan 2024 07:49:18 -0800 (PST) Received: from ?IPV6:2605:a601:adae:4500:b86c:e734:b34:45c6? ([2605:a601:adae:4500:b86c:e734:b34:45c6]) by smtp.gmail.com with ESMTPSA id ep24-20020a0566384e1800b0046696ea033dsm7981361jab.146.2024.01.04.07.49.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jan 2024 07:49:17 -0800 (PST) Message-ID: <8341e264-53be-4821-ad9a-145e154aeec3@sifive.com> Date: Thu, 4 Jan 2024 09:49:17 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 10/12] riscv: mm: Make asid_bits a local variable Content-Language: en-US To: Jisheng Zhang Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti References: <20240102220134.3229156-1-samuel.holland@sifive.com> <20240102220134.3229156-11-samuel.holland@sifive.com> From: Samuel Holland In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 >> --- >> >> (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