Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4039122ioo; Wed, 25 May 2022 13:28:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZkRpl+9/me07dywpwTFBHbhlwKfj+QU3JeS/MmLo+OmXh3D+T0tyBiIzshPXEk4VZAZhC X-Received: by 2002:a17:90b:3509:b0:1e0:5ecd:f72f with SMTP id ls9-20020a17090b350900b001e05ecdf72fmr12544829pjb.194.1653510537849; Wed, 25 May 2022 13:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653510537; cv=none; d=google.com; s=arc-20160816; b=B1YLy1VRhIbnNdkFiltZwuwU+bWhF4ZB4INNVd8dQeKWpZTaeIGDMx8QSZ/cq+Rc66 1gORuBrKpbpzY1B+iUo64YyVV54ACZ9IzBTf5cr0WkXDs1sjEt7fBfbCqsvvWHlMahDb U/p+RwytlWSPSgE9Tnmy6+uPYQmjm1+qzI+4SQI4mLFlpZP/Ku1R0VLoZka6m55rubqv zDoxTqf5WLu805zFixwX67oOZihsMjuvnrT9URIUpdMJime1pS7ChmAHq+WBJNhZQbVd wPFWkYX75VsRSO7m7aLFLsN7fYS6653eRo2/q+6l7ZQYKv8D7XVK60wiri0f9nUy9OxY RLVw== 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=3dUKuXpo4rdF2f2US+abnXeU02SHVaMdLgcq6habkms=; b=ToXEaPtwHFDRj7NlFtHPhKRsFWfOBkY6kWjdsjhzKl8zObOeBwQnkR7pqIxZFhm3/I MXnGRPVJC14VPqgiB/kS1s9eXEKIsyNV9HjcddFU0kvPOLQVjRxtBcRzfoLsp3T+cwDj wbIfuh24HzSbqDjOyPBw2EpMAcEDsx8Yeb/UgMPIa6wVsnDzY1wcfYfqIyZDzTvWPYud OZpMImq6dOi0tNxNFvcXQKX32f6Krb9UNSdwePXR3eldE7nan4/E2sgbpMWe0s3JOKmD 85D3kqRF3uECLK4WNQMZEB3lneFeU3w1czMaCwJlxttDN/vmZ4Rf3kJgYWcYFN6AXz2s O6zQ== 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 nv13-20020a17090b1b4d00b001dfab05243bsi2021089pjb.181.2022.05.25.13.28.47; Wed, 25 May 2022 13:28:57 -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 S233376AbiEYIQP (ORCPT + 99 others); Wed, 25 May 2022 04:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241800AbiEYIPF (ORCPT ); Wed, 25 May 2022 04:15:05 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4D547880DD for ; Wed, 25 May 2022 01:15:00 -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 110B21FB; Wed, 25 May 2022 01:15:00 -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 63FD03F73D; Wed, 25 May 2022 01:14:58 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Atish Patra , Atish Patra , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring Subject: [PATCH v3 13/16] arch_topology: Don't set cluster identifier as physical package identifier Date: Wed, 25 May 2022 09:14:13 +0100 Message-Id: <20220525081416.3306043-14-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220525081416.3306043-13-sudeep.holla@arm.com> References: <20220525081416.3306043-1-sudeep.holla@arm.com> <20220525081416.3306043-2-sudeep.holla@arm.com> <20220525081416.3306043-3-sudeep.holla@arm.com> <20220525081416.3306043-4-sudeep.holla@arm.com> <20220525081416.3306043-5-sudeep.holla@arm.com> <20220525081416.3306043-6-sudeep.holla@arm.com> <20220525081416.3306043-7-sudeep.holla@arm.com> <20220525081416.3306043-8-sudeep.holla@arm.com> <20220525081416.3306043-9-sudeep.holla@arm.com> <20220525081416.3306043-10-sudeep.holla@arm.com> <20220525081416.3306043-11-sudeep.holla@arm.com> <20220525081416.3306043-12-sudeep.holla@arm.com> <20220525081416.3306043-13-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_PASS,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 support 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. 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 6ae450ca68bb..e7876a7a82ec 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -544,7 +544,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; @@ -583,7 +582,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); @@ -600,9 +599,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