Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2229018rwl; Thu, 13 Apr 2023 03:38:34 -0700 (PDT) X-Google-Smtp-Source: AKy350Z8a2p+/ecUwS2pTrHpn3cEsiwrzALUMgvcLnP8epRQ451evNCOlhc11ymPmmNIZ21e2Dfs X-Received: by 2002:a05:6a00:99a:b0:63b:594f:bd1b with SMTP id u26-20020a056a00099a00b0063b594fbd1bmr759249pfg.3.1681382313562; Thu, 13 Apr 2023 03:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681382313; cv=none; d=google.com; s=arc-20160816; b=wucQYjezZ6Syp6sIiv6Gt04xnwGd+3EiS6+xfFKiAHceSkJUwuuoM1Guln/WJDZrpC ZpIRVumKF9VrmGtTugZU2ks6bq2Ntve33rvfMr3XrDaiMWgfLhINkUUqkoMKCosIO5ES cx72qmX2YF+WRENM4zWaWjWnMQCXoxaGJwnbE8K3j2d1IrOSEf2MI2sLRxhGviV0N2ns ICpzF6qi9t/5ypIuZHnuRR4auVRkfprOc9VBajaQhSedaV9ot/V3Xsc60v2Sgxb3wIj6 VdiyhU+Yr+lmRxuTVboDcuIIMxX8m3RdFpEOhgzMnsxY+TBkDl1F9wSFoPgaFsW8vJaa VcRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=arEYNFi4AJA5X/75SwwAlDvkEy/synbn254C1UkxKLc=; b=CRuyk5dVD7YhtDRjjfDAq/CxIPYsrJ/npEMicbWFO5S/20SJ2nl18zip/QmVfYpn5I LSEmctc9OpeBktthOULBw5YN5tAQf3cX0VQhUoaJBKLCsHyHqSBcXnZJLLW4aVuKEH/s sPmzKM1l19IiOFF3UomhNvodEfqMarrdzHL5M09FrMoTL5XSUryVF/BKASqrkLy2Q6Jb hmQlpGtimKBhVJI8NzHgWZ8NQX8BtxIiYH0Xpi2b+I6uszsozLhgctuXmFgVZGvzj5xf XKgTGZWe+HGwh1f9XzrCmFPhU8MLPNe2q0i66NqUlF5w64O2XEadn1FvyfriN8Npb98J QZNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vMHv2Fac; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j73-20020a638b4c000000b005186e9530f6si1947418pge.13.2023.04.13.03.38.22; Thu, 13 Apr 2023 03:38:33 -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=@microchip.com header.s=mchp header.b=vMHv2Fac; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbjDMKZy (ORCPT + 99 others); Thu, 13 Apr 2023 06:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjDMKZw (ORCPT ); Thu, 13 Apr 2023 06:25:52 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BE8E1BDA for ; Thu, 13 Apr 2023 03:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1681381551; x=1712917551; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=d6JkhJi3GMEJETeLt5/QwiarVzJRP85qpRFbz9J6gCU=; b=vMHv2FaciUmkn1vu+sfN31hxTAYDuCGD159kL/jgV/nA2cL37seGvwTv 4F+pr9/46XFfSJTiPV14jevd2Z4fw1htUbtRMGMnmJfw4r0swBXbkG9wP dyhkTM9IMduS2omNPmH4l1vzLtOMPKbnX8lUvfGXNGFWAK9VoLMEEuGNO AplcLH11d37KoTTQ+8LNbST46HJWShpRp2tuod2yMrvpBxCZtd8r82C01 tIM/qu3JbOc2XJJnJiUFRwcZ7taAvOFmJ2GSLKf/a2dhlzhCwx8gunVPR YnY4fGftjk/mF9Hym7n5rZpozO9TDHdwWZmxrviBcovWJHYr5tWw6dE2J g==; X-IronPort-AV: E=Sophos;i="5.98,341,1673938800"; d="asc'?scan'208";a="220709105" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Apr 2023 03:25:50 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 13 Apr 2023 03:25:50 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 13 Apr 2023 03:25:48 -0700 Date: Thu, 13 Apr 2023 11:25:33 +0100 From: Conor Dooley To: Pierre Gondois CC: , Radu Rendec , Alexandre Ghiti , Will Deacon , Conor Dooley , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Palmer Dabbelt , Gavin Shan Subject: Re: [PATCH v3 3/4] arch_topology: Remove early cacheinfo error message Message-ID: <20230413-craving-frying-59031194587e@wendy> References: <20230413091436.230134-1-pierre.gondois@arm.com> <20230413091436.230134-4-pierre.gondois@arm.com> <20230413-prudishly-unruly-090f5297fd54@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NuMYozQbxtD4g1AB" Content-Disposition: inline In-Reply-To: <20230413-prudishly-unruly-090f5297fd54@wendy> 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, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 --NuMYozQbxtD4g1AB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 13, 2023 at 11:02:49AM +0100, Conor Dooley wrote: > On Thu, Apr 13, 2023 at 11:14:33AM +0200, Pierre Gondois wrote: > > fetch_cache_info() tries to get the number of cache leaves/levels > > for each CPU in order to pre-allocate memory for cacheinfo struct. > > Allocating this memory later triggers a: > > 'BUG: sleeping function called from invalid context' > > in PREEMPT_RT kernels. > >=20 > > If there is no cache related information available in DT or ACPI, > > fetch_cache_info() fails and an error message is printed: > > 'Early cacheinfo failed, ret =3D ...' > >=20 > > Not having cache information should be a valid configuration. > > Remove the error message if fetch_cache_info() fails. > >=20 > > Suggested-by: Conor Dooley >=20 > Not that it really matters for suggested-by, and there's no way really > for you to know, but the corporate overlords prefer: > s/conor@kernel.org/conor.dooley@microchip.com/ >=20 > > Link: https://lore.kernel.org/all/20230404-hatred-swimmer-6fecdf33b57a@= spud/ > > Signed-off-by: Pierre Gondois > > --- > > drivers/base/arch_topology.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > >=20 > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > > index b1c1dd38ab01..1f071eaede5b 100644 > > --- a/drivers/base/arch_topology.c > > +++ b/drivers/base/arch_topology.c > > @@ -843,10 +843,8 @@ void __init init_cpu_topology(void) > > =20 > > for_each_possible_cpu(cpu) { > > ret =3D fetch_cache_info(cpu); > > - if (ret) { > > - pr_err("Early cacheinfo failed, ret =3D %d\n", ret); >=20 > Hmm do you really want to remove the print altogether? This can fail > with -EINVAL and -ENOMEM too, so should we just check for > | if (ret && ret !=3D -ENOENT) > instead, since in the other cases it really did fail? To save Sudeep (potentially) waiting for me when you resubmit, with that change: Reviewed-by: Conor Dooley Thanks, Conor. --NuMYozQbxtD4g1AB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZDfYnAAKCRB4tDGHoIJi 0nCwAP9e/l8OWTM6GRkGSd3WYkQ98acDHJfajdQxbnSWhfQ/igD/W5RJ/6hdRCqc 17eqZzM0ihZNHC5RNuUIvkW81Vr5XgE= =ZGoq -----END PGP SIGNATURE----- --NuMYozQbxtD4g1AB--