Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp311540iob; Wed, 18 May 2022 02:45:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk/1ebXzVMQZvuZuhr7knHYVhq/VOK6aeXpgjQPtK3K5n66pUre8zKk55bu6zTfNn3E7uE X-Received: by 2002:a62:6d47:0:b0:4fe:15fa:301d with SMTP id i68-20020a626d47000000b004fe15fa301dmr26909561pfc.29.1652867120658; Wed, 18 May 2022 02:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652867120; cv=none; d=google.com; s=arc-20160816; b=sIzQg/ASfWCN0fkJVzpvl1DyYyawqKa4OWUC9JEVmflSBVA5Z+M+jlkNH3gl23Ja6L 60/gcwjJsw8qgaL4pNPyRr3+xKkWBdn5TMmwJk+865heGjrpJ9NAhgwKTbEDiUc2Q524 f7eyHfC00ejqpC8L0nnNV5XuemYUznr6v/2kArqavFnvqQs9yHbfng3XwiFgRcIgULqX Sydb57i3JAQWTynQoYCc5eXgP+4byqi0OCYt8kAqY4WWVDJyRFbmid6ZOd5lMCXXxPxs FRbzCB/Yku80hLFLrkRovirii2XcNorMG60AcMn2hnoHPHms1pg0LP1NNXS45oFJOw9g 6i7w== 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=y9vuO98TmNeBfhOYDrzLvqIjt6pzTdPwyn1+6w5wh2M=; b=SLej63kVluc5eV+37qz1lpAGnN/Y1AgW/UVe/OuQXpsCidtzBjrSwZnNYLFqYv+OE2 ODh0T3yPYrrIxizX1hAgTA1KeBVb1J9oOe7NQ64ufRFUMZEaVeWifdlvTCtepuEQZz4u xjbCZm3M7a30Jpl+snTqkIWgR6FKr4ftkzlzie+VXXKM5jIF5FxAkXMyrMl2A4jO2V1B aYoZ7nwAqY0EdWtyUZ9S45CEX+7qcS8ZbEmzTb3Rj1RLN20ipvgIDMR/ZL85FWcrx9gP 5b3BYjI1kCm75zqeGWsQYlJN9q/ET36LRBWl2ebqIZr6cLNhCGE9bS/Sr67AXZjscGyj QZFg== 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v7-20020a634807000000b003c626c711a4si1976647pga.861.2022.05.18.02.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 02:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4081B0A69; Wed, 18 May 2022 02:34:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234377AbiERJeI (ORCPT + 99 others); Wed, 18 May 2022 05:34:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234347AbiERJd7 (ORCPT ); Wed, 18 May 2022 05:33:59 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A6B5AFB36 for ; Wed, 18 May 2022 02:33:55 -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 C8A471063; Wed, 18 May 2022 02:33:54 -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 5378B3F66F; Wed, 18 May 2022 02:33:53 -0700 (PDT) From: Sudeep Holla To: Atish Patra , linux-kernel@vger.kernel.org Cc: Sudeep Holla , 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 v2 1/8] arch_topology: Don't set cluster identifier as physical package identifier Date: Wed, 18 May 2022 10:33:18 +0100 Message-Id: <20220518093325.2070336-2-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220518093325.2070336-1-sudeep.holla@arm.com> References: <20220518093325.2070336-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 f73b836047cf..44f733b365cc 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -543,7 +543,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; @@ -582,7 +581,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); @@ -599,9 +598,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