Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1448099imk; Mon, 4 Jul 2022 03:20:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sr1FA7nYk/voS+dw7x6xYXGK8VW48+BQHuO+hSUfGFR0fXRzGZSrpdtZiL3dSkxOxFzIKP X-Received: by 2002:a17:907:1c06:b0:6df:b257:cbb3 with SMTP id nc6-20020a1709071c0600b006dfb257cbb3mr28691273ejc.631.1656930033899; Mon, 04 Jul 2022 03:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656930033; cv=none; d=google.com; s=arc-20160816; b=GC0YMBnWDn6b3giTjSAlBEjYcy/D010uZ+NRxZdkN6eUFUXRCpqrNzNKLSOsz1zGjR iilr5eZ/+e5YAKpvMIsuy0XIZvcErUgc2/5riA9CUWjiyv9PtIVoVEgHpQCQlaBtw0UZ pwq2fX+7yKxY7t2WKK38qSzeZgw6tL5FgaoFIZHNqSUsIXQjf/Ik9HZa4H6PO/Vgczj+ N+cv7b/n90NHzAeUslc5L57unNI+PEO97ijZfuhQFpGEoDb6Am93l/gAAd6H6mriKZ1g QVIJV9Z5BcbjuXHC0I1P12cZ93wt+5f9d0dF9RbZvuhoze1Bp/BPqOGynVR98NLA0i2A i4tg== 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=Z5FyRs14zXIdpICU6V7TUDjrW5DX6inTGjUvSowYCaw=; b=bei6LRUObHdCltOrIQ5zpov95QNz58M+V76gyfoHfly9XEybLl+Dgx0AmIv5rK4nMq e0+bGxzoTs7QDjYoal8HaKKB0WcmLSgCUDaPoTv+QCp2te+pUSaZe1Geip2BFdOIv7QQ OJr5yctNDvPbs8zzZEzHD4R1IYsg+iBNd8QtgHS4aRlme8gEhsjhQlpsAUD3SmtmnXH5 gu1x+dw+eSIk22NNBdlPC4YmFhbUgoJXWDjprzHGfYDStKMOaJ8oRoYi0Y4EukFAKmP/ kYB2ut4teS6y8ndpVmm14tCUf2ttWp6ihygLdYq0G6hlfrqSIFuDTrPXcAJvxHOnsVxW 24Dg== 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 cw9-20020a170906478900b00711ca15cd52si38317463ejc.230.2022.07.04.03.20.09; Mon, 04 Jul 2022 03:20:33 -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 S234444AbiGDKSH (ORCPT + 99 others); Mon, 4 Jul 2022 06:18:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbiGDKQu (ORCPT ); Mon, 4 Jul 2022 06:16:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0DF0DF9A for ; Mon, 4 Jul 2022 03:16:48 -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 076981480; Mon, 4 Jul 2022 03:16:49 -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 EB1693F792; Mon, 4 Jul 2022 03:16:46 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Cc: Sudeep Holla , conor.dooley@microchip.com, valentina.fernandezalanis@microchip.com, 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 v6 16/21] arch_topology: Don't set cluster identifier as physical package identifier Date: Mon, 4 Jul 2022 11:16:00 +0100 Message-Id: <20220704101605.1318280-17-sudeep.holla@arm.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220704101605.1318280-1-sudeep.holla@arm.com> References: <20220704101605.1318280-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. 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 8f6a964d2512..e384afb6cac7 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.37.0