Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4630514pxb; Tue, 25 Jan 2022 15:00:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH1HC4uKFLOX/T2TxhlEOV/ONaY7qLu0JeP1GeL/mc/WHqYDVsPJVYp0LZkyrSs/iLUOKk X-Received: by 2002:a17:906:3103:: with SMTP id 3mr18681695ejx.289.1643151642988; Tue, 25 Jan 2022 15:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643151642; cv=none; d=google.com; s=arc-20160816; b=yZHj1aTReOHTWaYwg5uCSDJfoUlNpqtj89RUbqVsQy59URCWNFEzZwsAS8jzR0A0bh vf+BCBMeCT4eWo6IzgT/Vo7AHi7RUxMAmm2qlD8naWAKppFDELwGi+zX2pLKbAxGnKAe R/6D0EN1RIF8Duz9yKslemaIpkYzaWnJtlQLh/iws6hw8a2gdMWHZAF4U7QFkpeSwhNY NZ2KDIIfpKmazNDyih7dy5ywP+zgV+GfhI8qXTC3IW4BJHLGiHe7+ofCQiqxvfZV03ho KvxT8a97Vl3Lw+1hLJGnWHnWMHscxtjMrAByzZinsRc8PFCRMrCgTa3tDkPNENhkFHZo rLmQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=h8uDvjNsWFKR1KCO6rh/k/1s/snnnf5qT2yT78YW+aA=; b=DldENa21xvvbpbck6Em1Mu1pXwr9+F8mSfMEUGqh4ra0b3zCC0RG3SjKsSv7VfvrF0 M7ejMyEarHS+QS/K/iBMKKHlnEKYMbRoR4CPGIFY0kNqRY0co9lHT0avOlA/J/j33wF0 ciSJPnwaKqPc7BUddx8Y8EeSj3mcFCbab6Al258pWusIzY93rSO6VlQiFrZzFCyyCVIt WpcfYOGEWLGlQXIkzOl9BciZ1v7eJT+82/SX7A6FMbewxGE+nqB3mGGHqWcfeWWTx6eR FjzdM1tNovdMM3eSrGe2yjQAXValELoVW8vMr2ro9VWZTwgEFyHR/k/X/Pn1c6PWzdLB 5/Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y+MbnJET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si1985518eje.845.2022.01.25.15.00.17; Tue, 25 Jan 2022 15:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y+MbnJET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582976AbiAYQIt (ORCPT + 99 others); Tue, 25 Jan 2022 11:08:49 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:60906 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377671AbiAYQHw (ORCPT ); Tue, 25 Jan 2022 11:07:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1BEF06172F for ; Tue, 25 Jan 2022 16:07:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 923C9C340F3; Tue, 25 Jan 2022 16:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643126870; bh=IdjPE/FcDNJAM0qD96J2RdCr8IUfsVB52t3qpnigWlc=; h=From:To:Cc:Subject:Date:From; b=Y+MbnJETvxadz2gQQIEjRRgYBsqwnTlXFwfLpi0QqZol2TQxy+NOB7fgalVp+EORF 3lLyCk25bKOj4NUnKjR8YVfGR/K4yUY1965Ztl0zulgudJqI7kls+pxeFM9W401L1W GSDDNyt3NV5PTzDpyuh82wPDOW1qHUv3FbtsKgv0j+z9xtjxyvsyA/Byz5F1IheZRK Y6mNSY7V9VE4/rH/l2cJpiQb7ibyPsH14bO+WoGs33BJKKTofRg6pTYLVo/M3WCErw qHBfyrJQoMiS0suvJv7F+dT/E8D3esrMBm400snFevzT3ZLNPNXH7u132eO0Nxvaz6 Zw+y8GdihuBlg== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] riscv: mm: init: mark satp_mode __ro_after_init Date: Wed, 26 Jan 2022 00:00:12 +0800 Message-Id: <20220125160012.3884-1-jszhang@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org satp_mode is never modified after init, so it can be marked as __ro_after_init. Signed-off-by: Jisheng Zhang --- 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 8347d0fda8cd..35586688a1b6 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -38,9 +38,9 @@ EXPORT_SYMBOL(kernel_map); #endif #ifdef CONFIG_64BIT -u64 satp_mode = !IS_ENABLED(CONFIG_XIP_KERNEL) ? SATP_MODE_48 : SATP_MODE_39; +u64 satp_mode __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL) ? SATP_MODE_48 : SATP_MODE_39; #else -u64 satp_mode = SATP_MODE_32; +u64 satp_mode __ro_after_init = SATP_MODE_32; #endif EXPORT_SYMBOL(satp_mode); -- 2.34.1