Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3073509rwd; Wed, 14 Jun 2023 10:50:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4oVJKNSoF4S6YEoGKKAu13CPkw990P7grnT5jIGlwoNGWyVxrnlMdC/8T7Pad+QEJMb6s0 X-Received: by 2002:a50:ec97:0:b0:518:7099:3e5f with SMTP id e23-20020a50ec97000000b0051870993e5fmr5602525edr.4.1686765037566; Wed, 14 Jun 2023 10:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686765037; cv=none; d=google.com; s=arc-20160816; b=H8a/mG3ffbew3BWz4AS30Hz2CIDXbxzADNJsVVVvElT/q8mwnav1+5kiJEPuvc4iLr X2ZNn7lIKwptAmLX1WBa7sXfKW3tEWAG2syT7xfzYMAl5rko9IeM992GEIsJ+6LyZpcH vEjapdqrIUD3mxfNbzealCPL6WVNCCYaAMm4cz9AjYnxbO5x4v+LlFwqNrm04+KCvVfk PPNmlBa5H97dP+GA0v/81y2OcioAW/6GyzbhPFLFu32JGMRQ/zbB54ONC+mPJCIor3MX wGfKb0j1zfRGNnIZiIxRcG6gKBDT9Hcm3NWei6VUVj2Kjd0Kbzu1p+MUezPsgvzxYhoC XJQw== 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=1c912ga+/eiXxdsYcONklV1EIJeRz6yMZku1xYhjdHA=; b=HlattATmC0AcDnJmBI1lp/De8/2RT6CUTY/+YNHzUInY12yrfadpoK19npiZZLPKEJ SCPHeQVRlrhNW7Qyrs7eImUFT2ymQvZUU20JA2JEFkmjL1EdHM+KFB0yp1czovQrSwVE ORk0mFBLcycF8G+57meMc/+VREeN78pIxyF2Qm1c3G9kmuRYk8Yv4UM4EChTkMyJjwUo KY52n+svcA0mZpMYfK1jh7sAGQ37eZW5wkyRqRntHrpaiJTLD+p7Cl315b1vmukywct6 rP7FjOTmPg+cgSk0FzB96RiVo8RrB0zWzhSqbpLAUvFC0KIF/YhfWCTlEq4aOMT4K2IV JTOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nZaXe/Fq"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a056402070c00b0051a1fd4506bsi216892edx.31.2023.06.14.10.50.06; Wed, 14 Jun 2023 10:50:37 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="nZaXe/Fq"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236622AbjFNRGe (ORCPT + 99 others); Wed, 14 Jun 2023 13:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236598AbjFNRGc (ORCPT ); Wed, 14 Jun 2023 13:06:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47068E41 for ; Wed, 14 Jun 2023 10:06:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D120563995 for ; Wed, 14 Jun 2023 17:06:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B95D1C433C0; Wed, 14 Jun 2023 17:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686762390; bh=r6WmK6pN8JZLuhkdUWl3EWEdgWXW6Xnybl6dJtROQn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nZaXe/FqPg/6fky/CfXosBUmIW2Noo0nes4r5ymfjKVsNeqFuSRyQAxyHOhicbU4t xguaueQOiZ7lg7LuC9SFyUrh2P0DrP3BRZFk6aEj9nORUFle74Q5tC3e4MSpJGVIf6 iAj3cXwcdUq7gEUrskoIk0W5QGsDA6llLPqkweStT0KmYkBlSmlFQOTLsM/fQ1O0Qk 56pLS9sQSNLyZrPYWsipzdZWhQ0Mv8kFIuGEJ5pgp+58IqvqMeiX8ZtjYPh+F2mr5c RBtDCpKC/7v0rAvStUEsSXbFRMkDH0hhOUcuriJEokWCAD6jTa0Zy7HMREtmJj/CK4 vBbwyiuiVZz3Q== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH 3/3] riscv: mm: mark noncoherent_supported as __ro_after_init Date: Thu, 15 Jun 2023 00:55:04 +0800 Message-Id: <20230614165504.532-4-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230614165504.532-1-jszhang@kernel.org> References: <20230614165504.532-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 The noncoherent_supported indicates whether the HW is coherent or not, it won't change after booting, mark it as __ro_after_init. Signed-off-by: Jisheng Zhang Reviewed-by: Conor Dooley --- arch/riscv/mm/dma-noncoherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/mm/dma-noncoherent.c b/arch/riscv/mm/dma-noncoherent.c index d919efab6eba..d51a75864e53 100644 --- a/arch/riscv/mm/dma-noncoherent.c +++ b/arch/riscv/mm/dma-noncoherent.c @@ -10,7 +10,7 @@ #include #include -static bool noncoherent_supported; +static bool noncoherent_supported __ro_after_init; void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, enum dma_data_direction dir) -- 2.40.1