Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2727398rwd; Fri, 26 May 2023 10:16:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7eZnHFRcrncWaqfc6q01KAYwkXlFdWIyvSbGcfT1M8IdBwVyLjnFkZS6S1pvC1qCy5BFP5 X-Received: by 2002:a05:6a21:3604:b0:10b:ab61:3b28 with SMTP id yg4-20020a056a21360400b0010bab613b28mr14968pzb.23.1685121413968; Fri, 26 May 2023 10:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685121413; cv=none; d=google.com; s=arc-20160816; b=eAkn65nhBYIB61xrndLpFOdJM/tPirFUiFx9j9yS1vdnKmU0O1+OQ7AMOhSC2rH7oX VXqsgbUADXYs7q61CD+c+JBPLSgpDZPHEcFE4GYE3P1JmWE5mcgSJHmC7pCQeEcgAabv WYFHvhfTH7IhceLiDDIO29EPq3yiBRnj2UNn7/9zxRwlxviI2r3wzCS/Rmn7I15FJnwr yLnCShWTWDEHdp6aV5o639fnmeJOW8mXpzwaEw6rqi5P8xpLxk03Cg4vy+kbiecJg98H kKimg7m3vF1c2dDyp56Kh6DLhupT4Mj0UlYFmLyTEKaMCcfHNXKrc/jE+aPik10eOLuU Wd3w== 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=wUK06ERx0KIeLlHGO9T0dp2dAobc+HmjXTfiEnqF0dM=; b=DHH5bAeD4a20QY1eb9e71zjgPyjbdf8vZF2c8ThFy9lisQcnDXPgSwZmz1BAFAYUrJ Mz048C8SvxhuL3EwzNnxCSswlZn6cP+MI7TdPbqBotPpNmjXHgiFddCJNCXFHso2YjH5 JD1OzeBh+JJbRhMTjhPhVboKhqE+aib21VJHHxFAl+AYD5DmtdC+YrPNxmNsnRuztd1r bZOqfebQ2+CFDNYW9TVKH8bNOReSnOIIY10KVSNPMxvmTQARgSuel6bDKeaIyQFa6ejb 6hwKTFrnSnxHaQbEMC8N0mHRpMpXKhNoAYeW9EFHIw7si9Wq0CejemnqL9dDWtnOgQX4 AycQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aqSdc9yj; 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 i189-20020a6387c6000000b0053f352478fasi3477527pge.307.2023.05.26.10.16.40; Fri, 26 May 2023 10:16:53 -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=aqSdc9yj; 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 S242337AbjEZRLb (ORCPT + 99 others); Fri, 26 May 2023 13:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242406AbjEZRLY (ORCPT ); Fri, 26 May 2023 13:11:24 -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 03B6F1B7 for ; Fri, 26 May 2023 10:11:17 -0700 (PDT) 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 F0A276519D for ; Fri, 26 May 2023 17:11:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09AA0C4339B; Fri, 26 May 2023 17:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685121076; bh=EFBwhFd9h5qljpxdSxEUl1LBAOZbrYHCRzIQKTfr4Eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqSdc9yjds0qBut4705CgMnspNEGuyhW+e1aoMQmGPboAeGFMDVvjfNAGTjvZCgZv CyuYU9rrIt276VNDMQ4RkYntlG86VMvrqucBi6vr9aM+tc8munbsrRU0TZpnlEXrxc UGbQiDbl21o6r6XyAlFF1w10ARU6M7vWRz3B2aYMqI5DQUtHVw/A/DH9hNaGuGnefq O6dfGs+cFxuthKDzH5KyY70wbvnLgHdK9ilEpFIxbOUNcSZfn3hMsTYojY3Ejmoy6I Y241nSqbxB7/nDNx99+A1sYt/6FtGfU2htL7glI0+OfpQ/GhvsPp02cit4tp7RJgfa 7kyyc8Qnzh61Q== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Catalin Marinas Subject: [PATCH 3/6] riscv: mm: mark noncoherent_supported as __ro_after_init Date: Sat, 27 May 2023 00:59:55 +0800 Message-Id: <20230526165958.908-4-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230526165958.908-1-jszhang@kernel.org> References: <20230526165958.908-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 --- 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