Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2739578rwd; Fri, 26 May 2023 10:27:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6O2ehktfTuRxWnShmde+7ebq0+5Sn0Hy+SUMivRowIIRYAyyANkoTcbADoOkZG0w3gQHqW X-Received: by 2002:a17:902:c40e:b0:1ae:44f0:82d0 with SMTP id k14-20020a170902c40e00b001ae44f082d0mr3706169plk.43.1685122074221; Fri, 26 May 2023 10:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685122074; cv=none; d=google.com; s=arc-20160816; b=RKkMbpqtvBW8oF0g1RI8r/WV58lQhIpvBapHifIGRdulyba55p7E2wV8zbaAoSkGx6 qs5OLVwV16hCGTcetAh+SOtXa1Vu4oAH2OmCRwfooXA9/174w4Zo6Px7ZDQ6s4Y1Sj15 BAZLlrLfymIHtmO5fYubSD9loSydpeUby0GbhGqHA8t2pxOOLV0FxNOe0R47a+XP5P0K OS1s7weEOIXc5PFVwnFkvdIFUQZN4mJws6JzuZvdtqC4tPwAeMxPV/KZ9j8bGVxCGFZ8 WB34ql5buD4778JtYRP3n9NHq1dDlNIOdw3im8XI6abmkP8c4fxbPZPOrvi3KuKyrZ5l hCbA== 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=Sk/quoTXDXH9qSLNzHTQUDURccgAkfXwock/OcmGOD4=; b=PhOpKyv0o7BzHyF46graZ4PZ1k0WVKn0hGyQVdxW5To4B+zbhoN0gTOFzZ17K0YX3N MoOcmtWbpSzV8g+GyBzQ5/5Bru/KcHfINjsgH52gTWLLlnqXS8nhXy7UZ1rvp3GR995G 9Us3zIQIHP8RoX3MU1lby0SVbvlTRdQW5mIXgVDHRBnoXRZLvObKklR3h0pGd7+/lMb8 iAeR0epLaTmDV5Rt6IsIiKtdXjXUl6dAOeAD61hGfUQFnMxoJeaTMn6f6u7kc0ThqbnW 8I25zbPudzZ9Ejn0oZ4ccR2xF8aTK+xrq76FfjNVNcNWNeJ5YfGNuDq8mnsHzhRKiegc H6TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dy9f79ql; 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 v202-20020a6361d3000000b0053f53139199si890826pgb.856.2023.05.26.10.27.41; Fri, 26 May 2023 10:27:54 -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=dy9f79ql; 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 S242394AbjEZRLW (ORCPT + 99 others); Fri, 26 May 2023 13:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242302AbjEZRLQ (ORCPT ); Fri, 26 May 2023 13:11:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006171B1 for ; Fri, 26 May 2023 10:11:13 -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 57227650CE for ; Fri, 26 May 2023 17:11:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64C85C43446; Fri, 26 May 2023 17:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685121072; bh=N+SE5apBHJdpc4kl5LVsR83pASoe466MUuKqmk4qCmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dy9f79qlz416EP/3kBixmbxtEXL1AKGqFraAcnWqIMmty/VaLIObcEn4i3SO2uOV5 QkhwCRgI/Oay6bicOxByimULBFgUFw4j6xneFP+fsk11XbUZMlDS3mNrTjpUoqqqTz DPwGGmjWeRBgtFzQ9ouzXuhtXZ9Y46W8C6ObVWRrOdxmxoX7UOcfV9J0b5bErkxuxC ppNttvMssdEoz7kRbhRyYN6bZlp+UYB42+BkQAbnz1U92W3qY73ZMyiDf8+iCahGwg LLej5KAh21kHUwffCZrId0f8ZlWjsdXRsPwBaepbd0kjN2eSX6TmWWJEi/Am3Jq5P5 BklHbdj0qYrUw== 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 1/6] riscv: errata: thead: only set cbom size & noncoherent during boot Date: Sat, 27 May 2023 00:59:53 +0800 Message-Id: <20230526165958.908-2-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=-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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; } -- 2.40.1