Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1296914rwe; Thu, 1 Sep 2022 16:18:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR4rI4kRqkT7F5Nrg830MjgHAJ8/mTE7ghprYq4r2NiCmCqOhdM7v9YUZmKy4jyuOMJSD1RZ X-Received: by 2002:a17:907:1b1a:b0:74a:18f7:7f63 with SMTP id mp26-20020a1709071b1a00b0074a18f77f63mr2608052ejc.28.1662074301567; Thu, 01 Sep 2022 16:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662074301; cv=none; d=google.com; s=arc-20160816; b=R28mlhQCTPBSg19iAZlLiINo9Dc+CaIX8KPFg5gphwHUQlpHMFHS4t5iYwNPoWMwLh Xoqjp5+HYj/dfyOvy1Puwvxas1EEfZUOT1I2BpWs/AoPW2nXgxo4+pB1VnckbroeOm/7 B5TKNvCVQ+DjPpWZpjgzAWLuBctZg6aXqgt+pEO+rSrlz24RtZfOChGs1tD3dz9Txc81 oj2Kx3DpzbQfOkfO5klF8CGUvJy8h6t8Hko7R5z0uHQ7H+hWntT99uJDnOZq/kdzz2XB YAituC9cmoQagoCz/dBAvd44gvGSi0YbGV14vEFboGkn+uscjEjiOGdszPwLgkpccni+ /OYw== 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; bh=3+YAq/AB/GXOiUORzl58dSYuUAq7dJcKonX4ztoTP+w=; b=RIZvEitPxkhmT+AbYF+/iOzvM+Vrtd7p9rnVfRvXn/WtOWfUqmTCfIOzJi72o5hlX/ FGCeNWq2CTtkJIE8bnQEt8YTzziP/m8apDJHCFBNN+0lWz742sTbBhus5Pw2KXMMOQTK 0sI7T6hoTem6AEYSgoewRmbttu0LK8XQBwugn2c+pScruK+8s4of+il784ac570QlLM3 ASi9v4ZjA2ktUfeXYv6BqfJmKq/3RkSV9PV2S/8OhoEpI6n0KWdsRIlmRyH/Y725Tdey FiTSlOZT/KIKvod6bLvBwg1heE5Rrw4HmkvQxoV336ney2KyxCSFlCVi0/Kfw/x5mbK+ nm+A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz2-20020a1709072ce200b0073040248a76si421251ejc.700.2022.09.01.16.17.55; Thu, 01 Sep 2022 16:18:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235140AbiIAWae (ORCPT + 99 others); Thu, 1 Sep 2022 18:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234599AbiIAW3p (ORCPT ); Thu, 1 Sep 2022 18:29:45 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80CD649B64 for ; Thu, 1 Sep 2022 15:28:28 -0700 (PDT) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oTsfW-0007wk-Sn; Fri, 02 Sep 2022 00:28:14 +0200 From: Heiko Stuebner To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: conor.dooley@microchip.com, guoren@kernel.org, apatel@ventanamicro.com, atishp@rivosinc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH 4/4] riscv: check for kernel config option in t-head memory types errata Date: Fri, 2 Sep 2022 00:27:44 +0200 Message-Id: <20220901222744.2210215-4-heiko@sntech.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220901222744.2210215-1-heiko@sntech.de> References: <20220901222744.2210215-1-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR 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 t-head variant of page-based memory types should also check first for the enabled kernel config option. Signed-off-by: Heiko Stuebner --- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/errata/thead/errata.c b/arch/riscv/errata/thead/errata.c index a6f4bd8ccf3f..902e12452821 100644 --- a/arch/riscv/errata/thead/errata.c +++ b/arch/riscv/errata/thead/errata.c @@ -17,6 +17,9 @@ static bool errata_probe_pbmt(unsigned int stage, unsigned long arch_id, unsigned long impid) { + if (!IS_ENABLED(CONFIG_ERRATA_THEAD_PBMT)) + return false; + if (arch_id != 0 || impid != 0) return false; -- 2.35.1