Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6165117pxb; Mon, 14 Feb 2022 17:25:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNH97lscSbBl/Bv+76y9tt28dV1zj4AmeMw8mnCStpvmmG7hsC12GaWGP9+9nveNgH+eYo X-Received: by 2002:a63:914a:: with SMTP id l71mr1482150pge.379.1644888313598; Mon, 14 Feb 2022 17:25:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644888313; cv=none; d=google.com; s=arc-20160816; b=GseOyq9PnRedXHnH/dn9aZNN6NL1oQxor08TdbMUOnjw5pYfB03cg0afQDVQFrUnfT gWGua2EL0XWzcgSkG1Y2mx3CIgBEfMaHCJEg9tULFEcspq51KU8wPv2nrmWBSSqr/UgD Ws6DOaEjWMO92yu3436GyXrk2QRXdZfhTWTvk6PWGZWcGsR1Ti9nWQZhfY2LzotLA2wM NYjVotjMX1OvXBeKqiejdjvRqeSN8M2ALBbrKvfN1CxbpCsLCxtGhZR4DwEF7890l09b ZIK4EU5wDoYCmUu7JV1HL99U8h4ekfgsVtR050GGOvfPrk3o1cbYOEg40nvbDtmnIAzt WcwQ== 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:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=GyZGTEHBo5D8EwjhOvRtD6BQCez2VkVTZwNRgtd0HSU=; b=qtd+AeJWCvCMMuMtvpD0moyGHkYO0LCAyAk9WZQUzQTYaYliKdt7bxggnbW9tX4DTg NnvcTGqfYzCzIvX9rjBDCcYGM7hVCWUm1XRO1tdMuZETjqftKMNLD6e4oT2Llyg3bMB6 6XpYllyt7KcU5W1pyQy+AdMn6rMzm+knM1NXsNoCAP7j6xxHNMa7VOPJhjwBvPDa/POi YgIjBv81f9sAouLM5saQKoe9u1BybjlY0OAkDBzIXJILxXh7jHtuuzxHobMZvMwTlwP5 9IxHVv73cpiGWCgegYh2EaoT1i97JbiZQX1h5NgL0eb7wntGY3Gh7l41lKHApUJJmg5i LSEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=UcNIqbaZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1si12853898pjo.44.2022.02.14.17.24.55; Mon, 14 Feb 2022 17:25:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=UcNIqbaZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232223AbiBNXti (ORCPT + 99 others); Mon, 14 Feb 2022 18:49:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbiBNXth (ORCPT ); Mon, 14 Feb 2022 18:49:37 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C176D14031 for ; Mon, 14 Feb 2022 15:49:28 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id t4-20020a17090a510400b001b8c4a6cd5dso595854pjh.5 for ; Mon, 14 Feb 2022 15:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=GyZGTEHBo5D8EwjhOvRtD6BQCez2VkVTZwNRgtd0HSU=; b=UcNIqbaZcuM1KdO7qywwCle4/8NkbBx5t2AanIGbHhjHDZ4WxbVVpgVg08PbhrIw0V PkOwB5yKDjJexBEajf6reo1lb2Im/CvZFMLHMxqL/kFmMi1iCCHKxOXuwThQ7zESPvRL x0LYJGtpL3q9TKFJPLVjugGSIh8DSTRZJOfx4Etv3jpoQ2yFhw5s9xJKItJu1ktlTbbq KfeuK/wM0xNqeHq8fwtfL+J+dB1lHqKuzJWziUbmgIESW5aA8ebYcGBlsDlWVWXCdhev swdBxfHBWE01KGP+heyDM/SpPmX7bi+m4h5iiCO/Zf53sqbBqeMxU7htZcCKvMmXJtC8 Ki8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=GyZGTEHBo5D8EwjhOvRtD6BQCez2VkVTZwNRgtd0HSU=; b=4SUDiTqwiux1Jnwm+ol/k4dbJOfM7vVX6qAua8jAOOx8DubQC9/AfLPH5eG+o0JEcr 5IRb0i7o4oPszQKEmjUnMdA5EDVSXgINxvxvDSHH7vnd1TtVesV4G9XnJNldt3ufEZX0 OUARZtp5Hc56BpSyG0IBm1eOXvFxDvO8KQCLa9QH6R26TL/hg3xeytAQjzZ+iK7Twr+F HmJLpn6U7006Ub+Olrb0dKV1DmIT3s7nV1XV5V2xqacn+QpBBrmrJ4Nffb3qJy1xfKvl O5+kmKdo0/wxCi3eR4RbNeReK6/ElWu2aYIsvfsmyrHrSaeQ+0g0EFpOovaEERr3PjFf NDGQ== X-Gm-Message-State: AOAM533Elg1/femQmKRA4gA9YSdlVzUv2lHewPnaBOfGPfJnjwGoJmxQ izFqOczF0YeIwqXxkqhONRTijA== X-Received: by 2002:a17:902:d3c6:: with SMTP id w6mr1405267plb.4.1644882568233; Mon, 14 Feb 2022 15:49:28 -0800 (PST) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id l22sm39388785pfc.191.2022.02.14.15.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 15:49:27 -0800 (PST) Date: Mon, 14 Feb 2022 15:49:27 -0800 (PST) X-Google-Original-Date: Mon, 14 Feb 2022 15:49:02 PST (-0800) Subject: Re: [PATCH] riscv: mm: init: mark satp_mode __ro_after_init In-Reply-To: <20220125160012.3884-1-jszhang@kernel.org> CC: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: jszhang@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Jan 2022 08:00:12 PST (-0800), jszhang@kernel.org wrote: > 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); Thanks, this is on for-next.