Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp835725lqt; Tue, 19 Mar 2024 05:36:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUICso3kI0RrzsmQ/ZjAIFElsrE1BeYcaohVbBoE0DXK9DKUWOliidEvbzbyRh5ZlsnR29SsP+Rh/F/m3aAiooLK4+dyTDVsU5VJJAnLQ== X-Google-Smtp-Source: AGHT+IFreESXgdv+pQmz/alc/9H0QwAZU6nj8kur4LzpA4HF6f20yDfALknOQhU9vDYcAdphpJaS X-Received: by 2002:a0c:ca06:0:b0:691:4f6c:a736 with SMTP id c6-20020a0cca06000000b006914f6ca736mr16529870qvk.51.1710851808127; Tue, 19 Mar 2024 05:36:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710851808; cv=pass; d=google.com; s=arc-20160816; b=V58sv4STbZvxbPowV00kstznD+YjMief/fMDSPBhC3amrq6HIaFwMRpkyqm0A5ShIk G95L1e0C5gVR4jMfgBHosEVk26E8h3I17gP3ZTNBy++zjkquRFemZuAFvWfwmhGgTjdV hB7LMojExJIfpuLL1a5H0pr7rcXptAtNuV5/g1Ohj+jW71El4Z45dtnLqR9sN868ALYG ohI5+KqcBa45h0V2Vq/9p9I4XH0LNd5YdTcai+rcOwmU+ceirPf0bkMr2ufoCHposd7s dYavVeJDwJmBwsz6NxC+UzDKLZRSKOR5wSI3BDDCL2DHPeHwpiIE4FllP1ipJEYml+5r caxg== ARC-Message-Signature: i=2; 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; bh=eGzMxWCI3Z4eEtV1ZOtD2eTWdSC+dbn9wPyde5x0AN0=; fh=tOkT28Fc3D2+pudvO1C2H2eE4Rtue6c/N6M5avEC8IA=; b=jweEPRfC5s1jjSyFWdIfRznaFBzF+d5i6rXaVp/uiCUEJCfgN6yFcfRz087D8J6rWG gVMUKYLZtXhVAmqGMsYfHIh0pfWlswWswooIbH/N1GiPIizA03l1uRo+jablCqliBQz6 WtzJldGAATDcwS2DV3mOuNjVdjiCih35yuihmbZ24hQaJkpr3538ui2luQboeuLsDbZl eiIcmfTFqcuipFn9vl3JBSpRhFzvb5/gvHI4drQydaBkufK97fCf4aDTF6kGoWUALvHa tuyKJtJ0pPHytlne9118IM25TsAbTdje+ogr5bk1DW/XcHWrcPgnDhZtoEzC00NdEYzV GiRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-107524-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107524-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs4-20020a056214226400b006915edf8591si10209411qvb.308.2024.03.19.05.36.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 05:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107524-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-107524-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107524-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D7F0A1C2240B for ; Tue, 19 Mar 2024 12:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B2E35A4CA; Tue, 19 Mar 2024 12:36:30 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05CBD5474B for ; Tue, 19 Mar 2024 12:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710851790; cv=none; b=ftjQeJeOCMkKk6nLWjqZiOw++AQGpPBx2aoMrt1oRNff3agK+47kKnN1Rx2G9nUiPmb3ISsVK0tiy54+p3p0oLY+IxX3Y2tHnXZWxZpVHC2moFS1G2ceznluPMfLw16RHGBt865qZvI5MC+/wUETq9+q+NnXfHXf76fcLm20Kvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710851790; c=relaxed/simple; bh=hf6IsCm4ZA2pa5JfzOk0nXMPDY1UVjN+vOmqMW3XA5s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ksrwcN4oFRsreqx2lUzwGSucJbIBzi4SumeaQ4fK3BhDJuGretcZRZDRRY86wvA1rS2XVqYtGStMMqt+7hwgj8ZQpj1z1244OWclJE7vMDEsA3Ou3rPnpQPEayAODEsV07m/YtvZH2I4m8ck42ANYc3vJthrlI5Bf1EF5Jyesjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 4743CC0006; Tue, 19 Mar 2024 12:36:16 +0000 (UTC) Message-ID: <112ac071-71cc-466e-ab13-f624edb77bb9@ghiti.fr> Date: Tue, 19 Mar 2024 13:36:13 +0100 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] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Content-Language: en-US To: Dawei Li , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com References: <20240312085005.298657-1-dawei.li@shingroup.cn> From: Alexandre Ghiti In-Reply-To: <20240312085005.298657-1-dawei.li@shingroup.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Dawei, On 12/03/2024 09:50, Dawei Li wrote: > IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is > redundant, remove it. > > While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init. I guess this comment ^ implies that you need to split this patch into 2 :) Feel free to add on both: Reviewed-by: Alexandre Ghiti Thanks, Alex > > Signed-off-by: Dawei Li > --- > arch/riscv/mm/init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index fa34cf55037b..204cdf5b829d 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32; > EXPORT_SYMBOL(satp_mode); > > #ifdef CONFIG_64BIT > -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL); > -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL); > +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL); > +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL); > EXPORT_SYMBOL(pgtable_l4_enabled); > EXPORT_SYMBOL(pgtable_l5_enabled); > #endif