Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp959224iob; Fri, 13 May 2022 17:45:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyexhwRh2sILKHfFKGrATuvExbkvlkFIXrRpX/YVyHFyvL1HL1PosqvtElf/wmIQOh7BWV8 X-Received: by 2002:a5d:47c8:0:b0:20c:95c6:23df with SMTP id o8-20020a5d47c8000000b0020c95c623dfmr5904409wrc.315.1652489116573; Fri, 13 May 2022 17:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489116; cv=none; d=google.com; s=arc-20160816; b=WeRIxacess1wnMV5Hld3OOlKL7G0MiNi6eQq5lJEpIgdqfhweVGfEF02DTn66gTXES vEhDAskVjSAYRRrSFzLTb9+lCEQLz3eybReRNkcTmH/wWHB5RbC7tPI0+cj0mIy8hqjg XHhsHQhPiuSSCn/4896iaH/KWnRvlyOF0j0l5Z/2rcPYnZZxXM+OqPfB/fyW9AktBQIE LCM535lZUNcJ7rZgffCVxX9wY/FlJbxz4QLK8x60gVCYi7mAw5u2xNC7aPD6ddiIEMFW dNGhLcabuqd6IRrZc/4PJsrYcDoZy6sgOyHDjjQyhL1xsAdYeslsdQ9nT5GmgUbmlYmp ccmA== 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=tJNg7YtR/QmZ0n6HecVC4RFEjdX1d6RnhUnEcowo3epmuZvi8+xnY1lr+s75Tk+uEl Mhy7snrBNjVGBrE2YOLpooCxwYzjvbwiR/vF6QyxbJ2MruK9rFtMpo3O56YX+S4/pbo3 J24TbfyfAi5fINimsZZ7WXGUAlGGXLRnEzkEIFZy/pWGA+VWVfx1bJS2ttctqXuQK0jl nShO4OH2TelrfnmllQ9rptJ+XW5Y2PZdDpDrr5znxLoAAmC2nKLn5spfzunwc+WfbjQT AbdiCbaZr2+oIFA+PIJFeG6EN7gJ4voWjjnUvjARSgwQVtPnoQPaXPggsOmfBWFwtE46 5ELg== 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 t10-20020a5d690a000000b0020c73129ddasi3596847wru.598.2022.05.13.17.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:45:16 -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 9E4C63206B8; Fri, 13 May 2022 16:24:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379257AbiEMJ4X (ORCPT + 99 others); Fri, 13 May 2022 05:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378821AbiEMJ4O (ORCPT ); Fri, 13 May 2022 05:56:14 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49D9D17ABA for ; Fri, 13 May 2022 02:56:12 -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 C11A11477; Fri, 13 May 2022 02:56:12 -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 7FBAB3F5A1; Fri, 13 May 2022 02:56:11 -0700 (PDT) From: Sudeep Holla To: Atish Patra , Atish Patra , linux-kernel@vger.kernel.org Cc: Sudeep Holla , Atish Patra , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Qing Wang Subject: [PATCH 1/4] arch_topology: Don't set cluster identifier as physical package identifier Date: Fri, 13 May 2022 10:55:56 +0100 Message-Id: <20220513095559.1034633-2-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220513095559.1034633-1-sudeep.holla@arm.com> References: <20220513095559.1034633-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