Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2201824rwl; Thu, 13 Apr 2023 03:10:44 -0700 (PDT) X-Google-Smtp-Source: AKy350bzPdFK5hvhfHuwCJ7qmBN8beRslYnTcixzgut68Y8hX9kjRu6oqe4/9zJqtmcsUjl5Tf2p X-Received: by 2002:aa7:d3d6:0:b0:505:879:b54f with SMTP id o22-20020aa7d3d6000000b005050879b54fmr1907131edr.37.1681380643572; Thu, 13 Apr 2023 03:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681380643; cv=none; d=google.com; s=arc-20160816; b=h31OIhWooZ+1JNt/Df/BsaZwa6J0dpWRbFMJQQbxpEZcCGgzKQyzXtolZWXhdM9VSy rPeIoOHC0tmWXexgGsL5kBRh5R94ZtXEbSjkV4081/nKg9yR5Xk0hYIA/PpkmJFN7Zvt MQPDbuCbEWF6H1/HPK1Cxova7eCbqPU4+bPFbWKkNRegGBecamf2H2DC6dVkw/P/Pvio Iy6dg1waQ5ZUOLBIyxejLhfwB3kBABPnVqzvaDPh0065y4RVKaca5j4HV6FkQTrjHo9e ENn8J9RMra4k4nCS1/IK5mQVdUumN9nuuTvAWTEYhVlIkktLek7n77XHgGislRZR4/Tz ToyQ== 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=1KvtTYJqv4wfEVzq37cBUupOVmo8Q5OLjyT2QSVNI1A=; b=W0V+c94YlULIGy2CEwoGVpeaEaAk3F7eUjf6+GmwfwOS1MwmDHaivSfTlv4FF45WzR zcctBpBo9NR9C1+jRImRYxfnfbWotLwRLFwFsYqUKW4GnGGM6bzY75g0HOX7dky+tBo5 Rq/9DvxsBna6I6hdRzhxwKd2uus5Ohm1PptMRU5V6tOeOQzlpBmvWO6hTg43BcRNFFIb T5+GXRZyDLO/Ni73e1NFq8OYTKeMdugmmtji2rVAUt/t6w8qt7il224R0qttWnHnq+0Y 9ahBj0trYVuQdrI/ulpL887TvtrARO99ssrjM1u2weK1KD5Keo7NnUy1nYTaxL5wr8sO dP1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=kh6UdKuU; 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 ay8-20020a056402202800b005050653fca7si1595608edb.219.2023.04.13.03.10.18; Thu, 13 Apr 2023 03:10:43 -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=kh6UdKuU; 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 S229913AbjDMKDL (ORCPT + 99 others); Thu, 13 Apr 2023 06:03:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjDMKDJ (ORCPT ); Thu, 13 Apr 2023 06:03:09 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1835FE5 for ; Thu, 13 Apr 2023 03:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1681380190; x=1712916190; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4MzuhZHBbPmQVbijtFmXO+9tVxRJdViVCL5UWZqqFdA=; b=kh6UdKuUDoS5BCnJ0a7dV1NoSKJEx9OK3slGPAALJQeL3kg7s5Dnn2NQ dtRJNLh6mMuAXmUD81O7ZZmLTWP5RCRulOlzlkS3eHP5TIcpjVexiYtlo mvT3Io5vjsHzQFRJ6/3VqmRv26F9sqk/50TEJxCqtvHeZj9L+evrjdFnC 3exPA/H80KNSjEi0DNIVqwcBDblKwaqb2qsUd3qokffB6EONJ0pkVl1oU 6qj0H6OUzZXzzTsS7pO/EZK4F5SXQOa/VBtiWIOnI/KvDSb9foeYtPtJY my0D1B9Z+BbrqIa5catngBdDNGpQEnyDMYzEebH0Nk05qkBZRq951yKPj g==; X-IronPort-AV: E=Sophos;i="5.98,341,1673938800"; d="asc'?scan'208";a="209373248" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Apr 2023 03:03:09 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) 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:03:02 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) 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:03:00 -0700 Date: Thu, 13 Apr 2023 11:02:44 +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-prudishly-unruly-090f5297fd54@wendy> References: <20230413091436.230134-1-pierre.gondois@arm.com> <20230413091436.230134-4-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ual3BbTya047iMjD" Content-Disposition: inline In-Reply-To: <20230413091436.230134-4-pierre.gondois@arm.com> 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 --Ual3BbTya047iMjD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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/ > Link: https://lore.kernel.org/all/20230404-hatred-swimmer-6fecdf33b57a@sp= ud/ > 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); 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? Cheers, Conor. --Ual3BbTya047iMjD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZDfTRAAKCRB4tDGHoIJi 0tYkAP9yLlzQHvQg1adZ0A+5pW0ajLaHO2FY8QNfvn4cQFWuWAEAvznI8IVt+o8u oUW6Cwfdejb70Uknvd2u4ISyC6AcuQc= =5ghb -----END PGP SIGNATURE----- --Ual3BbTya047iMjD--