Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2151264rwl; Thu, 13 Apr 2023 02:17:38 -0700 (PDT) X-Google-Smtp-Source: AKy350bcggYM5P+eBvCVsrxzg/C9rfuev5jR2jDk9OgKfgw9tqlNzRfQIR0pk/vJDjli+O+ve7W1 X-Received: by 2002:a17:906:b35a:b0:8aa:be5c:b7c5 with SMTP id cd26-20020a170906b35a00b008aabe5cb7c5mr1907015ejb.41.1681377457943; Thu, 13 Apr 2023 02:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681377457; cv=none; d=google.com; s=arc-20160816; b=wvtKpq06FPZjPqJCtl3FF6whU6Sd/VRjsAMCTTSsnh19EJIPTQlHg7pItJWUdweM1A ZXIynag/lyVU8GMahWzNGaHnFGuRZroNIbhfs3+F6IkK/gkWAmtEccglnddjpM45Wgik 1YgtylofHcwntnvU32e7lDCFPIMZ1K88wVIuvQy+dd0x7kMnaylkeHppHVDZp7B/TDCB PZdbfDJ6+lgZAXygR1RzQQeDDJtOAzYqyAa8b7oK1pk6/0vDSgMsd7KvExekcN7dRCkw ObxjzTRI01aP9f64vmfj2bcgyKSSE1Ho3EZ/uJzOOLRTK1I+zUFZnSj6yeD+K7+1BrEA HmSQ== 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=vyh+Z3p5FH+60z2QrHUnhOLI+BilfGmS0e7cNQdqmks=; b=AXuiKXeuI3HnNRg87zMaeRniKrZBLbCTW6FbzaDu6NOrtO54M8c81sbaj3YdVXOuhL 75h1p18tkC7Bd7a4jSvCWy2Wwe0THjso6i1At3eBcmtPBaGDiPS1LYZcJMTjAKLOlEU8 UMx5gnq0qOLtKG310FYMmcoTuqMFPNSpMv1f82l6TgZ2yPUQPXVe57Odmp6AGrsHwSat wMMfJDKIu5UnGpkoyynKHB0wzh+I5sYUd6kR6kEC0gCOFs1CNtrTXkppTl90B9GYwlZ4 rzs2K2xdIAm7YDhwt0YEB5EmqA34/o2Rz1eOHgA/Y/hUzi2Pi5SNrsJFwe/zSbKREUj4 tDbA== 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=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020aa7d3d4000000b005066b3e94d3si1294952edr.653.2023.04.13.02.17.13; Thu, 13 Apr 2023 02:17:37 -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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229736AbjDMJPZ (ORCPT + 99 others); Thu, 13 Apr 2023 05:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDMJPS (ORCPT ); Thu, 13 Apr 2023 05:15:18 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6CC0C6199 for ; Thu, 13 Apr 2023 02:15:10 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8708C13D5; Thu, 13 Apr 2023 02:15:54 -0700 (PDT) Received: from pierre123.nice.arm.com (pierre123.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 427923F6C4; Thu, 13 Apr 2023 02:15:08 -0700 (PDT) From: Pierre Gondois To: linux-kernel@vger.kernel.org Cc: Radu Rendec , Alexandre Ghiti , Conor Dooley , Will Deacon , Pierre Gondois , Conor Dooley , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Palmer Dabbelt , Gavin Shan Subject: [PATCH v3 3/4] arch_topology: Remove early cacheinfo error message Date: Thu, 13 Apr 2023 11:14:33 +0200 Message-Id: <20230413091436.230134-4-pierre.gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230413091436.230134-1-pierre.gondois@arm.com> References: <20230413091436.230134-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 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. 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 = ...' Not having cache information should be a valid configuration. Remove the error message if fetch_cache_info() fails. Suggested-by: Conor Dooley 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(-) 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) for_each_possible_cpu(cpu) { ret = fetch_cache_info(cpu); - if (ret) { - pr_err("Early cacheinfo failed, ret = %d\n", ret); + if (ret) break; - } } } -- 2.25.1