Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3145681iog; Mon, 27 Jun 2022 10:03:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1szz2n0uJ0z0IhxigjOM8kq5sUdsT9L1Xff7EEd7MTdWbwptouexX51dnWQSqFpsgi5g+zY X-Received: by 2002:a17:90b:164a:b0:1ec:b991:b69 with SMTP id il10-20020a17090b164a00b001ecb9910b69mr21982538pjb.173.1656349435629; Mon, 27 Jun 2022 10:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656349435; cv=none; d=google.com; s=arc-20160816; b=su4d+T2d7N/WZQBMESHjubCd9ANMFeE2WoFYxmoNUudPkgNFbdyXx7IihZ+NJd7+T6 LGbPYJKiTz27J0mOGpoO0uCKs3JFfJZ03Ly2c/B5x40wKQgk02NIgxMl9Nuqe9+Oq/jT eBneFbQA1o2MDouPKqVuZOeXv6E5xMLqOiJL4ySax32Ye1jI2JFZyh2dETvIeUmcfMG8 s8pGY4Ong49qyffUsJarsBWUYQAMCy3Y6Hwsf9tT3o+nT21I3zItI9FzHIwlBm3hZ7LB sQspfYUIBhx+s/IfA6yWvNDwvNg4vhf9okAzJdkT77k2DEqUoOz9XHPIncSl2+LO3ty1 FrdQ== 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=prZzXul2PzufAhT0zPRxato2Dd4lFme+2pQFir3A/Jw=; b=Iixi8B6irLI8/Cj4uEwWRsLOwaOwL2VdYBeSWoVawKZpZFeBrKMfSfCMyLReQdMBq/ 6P6c1wCyG9zAxFqaoaWQaaO2+jH3eERmu2t3gdIMdJYDkt6fqr2OG/U2u4uxYQjZiw0C UXktJvARCd9jEsi++8qp3yzqII4WQHRa0j4wTnd6n6+LXWPM2QNJcbxUktd1RQvfJrbx jFcrYIZB7iFB6tob55RC3O/9E6T5eOEfQACFOBeBwESlm6Gpzbx2RhBvcg1Z8nYWjDIf ID77D1mjArYk0swn5UjQDOTz8Q83RjK4dRSADkyUF7hmBHDPglYnE+v4UIu0GUVpguX/ lzkA== 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 d8-20020a170903230800b0016a75602af0si12306226plh.601.2022.06.27.10.03.42; Mon, 27 Jun 2022 10:03:55 -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 S239668AbiF0QwE (ORCPT + 99 others); Mon, 27 Jun 2022 12:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239552AbiF0Qv2 (ORCPT ); Mon, 27 Jun 2022 12:51:28 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C17B612AA3 for ; Mon, 27 Jun 2022 09:51:27 -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 A7FD81758; Mon, 27 Jun 2022 09:51:27 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C53343F792; Mon, 27 Jun 2022 09:51:25 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Greg Kroah-Hartman , Atish Patra , Atish Patra , Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: [PATCH v5 15/19] arch_topology: Don't set cluster identifier as physical package identifier Date: Mon, 27 Jun 2022 17:50:43 +0100 Message-Id: <20220627165047.336669-16-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627165047.336669-1-sudeep.holla@arm.com> References: <20220627165047.336669-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Currently as we parse the CPU topology from /cpu-map node from the device tree, we assign generated cluster count as the physical package identifier for each CPU which is wrong. The device tree bindings for CPU topology supports sockets to infer the socket or physical package identifier for a given CPU. Since it is fairly new and not supported on most of the old and existing systems, we can assume all such systems have single socket/physical package. Fix the physical package identifier to 0 by removing the assignment of cluster identifier to the same. Link: https://lore.kernel.org/r/20220621192034.3332546-16-sudeep.holla@arm.com Tested-by: Ionela Voinescu Reviewed-by: Ionela Voinescu Signed-off-by: Sudeep Holla --- drivers/base/arch_topology.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 7a569aefe313..46fa1b70b02b 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -549,7 +549,6 @@ static int __init parse_cluster(struct device_node *cluster, int depth) bool leaf = true; bool has_cores = false; struct device_node *c; - static int package_id __initdata; int core_id = 0; int i, ret; @@ -588,7 +587,7 @@ static int __init parse_cluster(struct device_node *cluster, int depth) } if (leaf) { - ret = parse_core(c, package_id, core_id++); + ret = parse_core(c, 0, core_id++); } else { pr_err("%pOF: Non-leaf cluster with core %s\n", cluster, name); @@ -605,9 +604,6 @@ static int __init parse_cluster(struct device_node *cluster, int depth) if (leaf && !has_cores) pr_warn("%pOF: empty cluster\n", cluster); - if (leaf) - package_id++; - return 0; } -- 2.36.1