Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5092901rwb; Sun, 4 Dec 2022 14:16:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Iz9ofHO5CKaPhdaKpecGl9C7AskFSuAFwaY6OPNdLjKjTMwOh9BycbYnS4rd3fyP1X0xu X-Received: by 2002:a17:907:cf92:b0:7bf:7a65:b242 with SMTP id ux18-20020a170907cf9200b007bf7a65b242mr27808364ejc.356.1670192167107; Sun, 04 Dec 2022 14:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670192167; cv=none; d=google.com; s=arc-20160816; b=fgr1VKUaa+FRb5jUEqdvtECkd3+Lv77ozFKzk6z1mPm/jcpzIFKpBo4RRUZW1hmZqM rk9Q1mi5TtriuI3lhLehG2FulnaAEHsERxj9IeCkJZCHJ5+ElBRMj94HCN27Xg9Xemcl 7IOBcH8EY/j97e6UE96NFsCjshKEKABpAivj9ePQ1XOVeumwKtb5q+kviKgWHVf8Q8No JViYsGAI9I7bOnZFKXD6wOlCRakM2D0JSIYoAU7s+6/8FIT5nNpkMol/5wKZ+paMrSKa qgqjQtU2Pj5CkvMyg25jhh/u3GB+F70I+RMItd3arGiszLofTEVcKBBK8sb0aXSWJu6F WgmA== 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=N/i/TvoHHz1S8SKxWSoL+kWmB68euLTU/o+2mWGOA0A=; b=s2T3/2/WfJ53rwSwqyfFlnsNJC4G7Z9OBG4RIbERweCCHsHHBkhSJh0Wh5iW+cn6Xy AQpmd+32szAWAIqUReb6+9K1zApq2ddBzvGa16jsiyjkg+vZ/KPyB1ENKwwNH/Ld8CR0 n7sSANC5ybjdVzAt+yFFMIbngANHygCt9D5c922CcVK/vMh2KPgn8wqZIDzVa4ClN7+2 9Xfbf9WsFEuGlvEMDyvF6NyIMDVwv6poAJZu3uB1NNrGpsi8ACT1bdIhUwE2F3SUkaCh ajt3EAJWeEC2u45aqsuBpKalqYOPLiW3fR25bwGsSGw107tEl9YeQIqnWr1ccF9bPZoz Xw4g== 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 qk7-20020a1709077f8700b007ae814af68dsi11459136ejc.355.2022.12.04.14.15.46; Sun, 04 Dec 2022 14:16:07 -0800 (PST) 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 S230400AbiLDVwR (ORCPT + 83 others); Sun, 4 Dec 2022 16:52:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiLDVwQ (ORCPT ); Sun, 4 Dec 2022 16:52:16 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B0A101C0; Sun, 4 Dec 2022 13:52:14 -0800 (PST) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p1wu6-0006zx-3Y; Sun, 04 Dec 2022 22:52:06 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Palmer Dabbelt , Paul Walmsley , Albert Ou , Anup Patel , Atish Patra , Andrew Jones , Jisheng Zhang Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Conor Dooley Subject: Re: [PATCH v2 02/13] riscv: move riscv_noncoherent_supported() out of ZICBOM probe Date: Sun, 04 Dec 2022 22:52:03 +0100 Message-ID: <5629547.DvuYhMxLoT@diego> In-Reply-To: <20221204174632.3677-3-jszhang@kernel.org> References: <20221204174632.3677-1-jszhang@kernel.org> <20221204174632.3677-3-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, 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 Am Sonntag, 4. Dezember 2022, 18:46:21 CET schrieb Jisheng Zhang: > It's a bit weird to call riscv_noncoherent_supported() each time when > insmoding a module. Move the calling out of feature patch func. > > Signed-off-by: Jisheng Zhang > Reviewed-by: Andrew Jones > Reviewed-by: Conor Dooley > --- > arch/riscv/kernel/cpufeature.c | 1 - > arch/riscv/kernel/setup.c | 2 ++ > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c > index c743f0adc794..364d1fe86bea 100644 > --- a/arch/riscv/kernel/cpufeature.c > +++ b/arch/riscv/kernel/cpufeature.c > @@ -274,7 +274,6 @@ static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) > if (!riscv_isa_extension_available(NULL, ZICBOM)) > return false; > > - riscv_noncoherent_supported(); > return true; > } > > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > index 86acd690d529..6eea40bf8c6b 100644 > --- a/arch/riscv/kernel/setup.c > +++ b/arch/riscv/kernel/setup.c > @@ -300,6 +300,8 @@ void __init setup_arch(char **cmdline_p) > riscv_init_cbom_blocksize(); > riscv_fill_hwcap(); > apply_boot_alternatives(); > + if (riscv_isa_extension_available(NULL, ZICBOM)) > + riscv_noncoherent_supported(); hmm, this changes the behaviour slightly. In the probe function there is the if (!IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM)) return false; at the top, so with this change the second WARN_TAINT in arch_setup_dma_ops will behave differently Heiko