Message ID | 20230614165504.532-2-jszhang@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp108747vqr; Wed, 14 Jun 2023 10:20:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ660SNCgfVde8PDOh9nQwzKHM/1UKp1E7uOu5ypoIO99gLUW+BqHHFkT5b5imsEeubOgXeb X-Received: by 2002:aa7:d058:0:b0:514:a419:181e with SMTP id n24-20020aa7d058000000b00514a419181emr10991467edo.20.1686763203903; Wed, 14 Jun 2023 10:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686763203; cv=none; d=google.com; s=arc-20160816; b=KvdC8IU0JYs4qlMOuYlefMQpEKK8T6khjgNsBqe74OpkjA02cpmOSfEfzwTuU1jIXE G3KGgaMxUcq8pGeMdLy5Z6qGjRA4auPeVSPy/5hspwMACzYV7WrnO5eGhj8zJfxNRf59 sfGBoa3nJT26Mq5NhrBQpYqXPP6J4A9vLoyh83cIgs8OcdIHQ7N1uel8L2WKSWjUjBNF NgOsUVcf79clcO33Jr1t9pepbV/bz6P6ZpnackcXftkR+i8EWNtlR/m67oJiU7pzrRfR u3OdYbqQ0/++Rg1eSEc6+jERy/sZUwJkmO/SHYb4Ig0L15KTL3IWafku8Pl8oYhq7jMd RmfQ== 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=173dqcQzBqjrNQ7+zfHjjj1MRojRr5GjOF0RWF1oyho=; b=itxyiJaFDiYStE76uKzzBlNKgNzY689srgRMg1OG6seS1RursfSm6L02p/sKGDKxqh msTUbu/5Ape+73D912NKSWww8sZ/F7InBv3aJt3zNhi7fwI3BT7a8c6ChA7uRqIl7Zaf qBhdVIpAkHb/LB60pBmWxHwTEeZzm0h1sw/eLMM+4mTTdc8obd745XxFt1quGrVU9i+a slUF5BkVyAfEF6vxSNjudBzZpfbEPPTA5h7hOb17hRFrVLbwlBM+ksDGkIC/fNcyplpO w6P/ZWnVb39W2i/0uwojP1eSO7gjgjis2nLueA2a/Tire4ssSsjbQcb2ghHyY7rQyiN9 Jo7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C2rZISm1; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a056402160300b0050bf72fadebsi5308499edv.280.2023.06.14.10.19.37; Wed, 14 Jun 2023 10:20:03 -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=C2rZISm1; 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 S236571AbjFNRG3 (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Wed, 14 Jun 2023 13:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236505AbjFNRG1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 14 Jun 2023 13:06:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53CF8E41 for <linux-kernel@vger.kernel.org>; Wed, 14 Jun 2023 10:06:27 -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 E0282638A3 for <linux-kernel@vger.kernel.org>; Wed, 14 Jun 2023 17:06:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C92BAC433C9; Wed, 14 Jun 2023 17:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686762386; bh=QeH29Idc/6qrLsvNLxNicZ5LF/IoEKjciGzozuHn9t0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C2rZISm1K8SkX1xOX2TLo7PW3cS1O2+YAR3k8M/A7VHYIwyHqnIYBfZHgFZjoHAcU D6TI6td2vGW0/E3u69+d2Zu7PFJ2td8w0NweV8byRIQnpl3T+xRcHQDXzF+Eg/24Kl siFAuXe4IaioC/8Z1rh4+OBr2Q9k+zPGamRaR8KE5Q+3kXXjDS44jOvQ+tiTZhqZWo YGCtd0MSzQSzdydgVrdgOXvuAO+tZb1xla2qNqdK9DMFnKtUXfHygowqSgjC1PS/4z aq3kHPtbo8dEMetGxnDv5izg4t5+r2BOJCxxMQKppXEb7mN2OIBSCx71X/3FFRVeOi wbMRbsRj8hzTA== From: Jisheng Zhang <jszhang@kernel.org> To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Conor Dooley <conor.dooley@microchip.com> Subject: [PATCH 1/3] riscv: errata: thead: only set cbom size & noncoherent during boot Date: Thu, 15 Jun 2023 00:55:02 +0800 Message-Id: <20230614165504.532-2-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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768699413202075122?= X-GMAIL-MSGID: =?utf-8?q?1768699413202075122?= |
Series |
riscv: some CMO alternative related clean up
|
|
Commit Message
Jisheng Zhang
June 14, 2023, 4:55 p.m. UTC
The CBOM size and whether the HW is noncoherent is known and determined during booting and won't change after that. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- arch/riscv/errata/thead/errata.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/errata/thead/errata.c b/arch/riscv/errata/thead/errata.c index c259dc925ec1..be84b14f0118 100644 --- a/arch/riscv/errata/thead/errata.c +++ b/arch/riscv/errata/thead/errata.c @@ -45,8 +45,11 @@ static bool errata_probe_cmo(unsigned int stage, if (stage == RISCV_ALTERNATIVES_EARLY_BOOT) return false; - riscv_cbom_block_size = L1_CACHE_BYTES; - riscv_noncoherent_supported(); + if (stage == RISCV_ALTERNATIVES_BOOT) { + riscv_cbom_block_size = L1_CACHE_BYTES; + riscv_noncoherent_supported(); + } + return true; }