Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E659BC433FE for ; Fri, 13 May 2022 09:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347873AbiEMJ4P (ORCPT ); Fri, 13 May 2022 05:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379252AbiEMJ4M (ORCPT ); Fri, 13 May 2022 05:56:12 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 809881402C for ; Fri, 13 May 2022 02:56:11 -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 55CDD143D; Fri, 13 May 2022 02:56:11 -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 160BC3F5A1; Fri, 13 May 2022 02:56:09 -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 0/4] arch_topology: Updates to add socket support and fix cluster ids Date: Fri, 13 May 2022 10:55:55 +0100 Message-Id: <20220513095559.1034633-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, This series intends to fix some discrepancies we have in the CPU topology parsing from the device tree /cpu-map node. Also this diverges from the behaviour on a ACPI enabled platform. The expectation is that both DT and ACPI enabled systems must present consistent view of the CPU topology. Currently 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. Also we don't check if all the cores/threads belong to the same cluster before updating their sibling masks which is fine as we don't set the cluster id yet. These changes also assigns the cluster identifier as parsed from the device tree cluster nodes within /cpu-map without support for nesting of the clusters. Finally, it also add support for socket nodes in /cpu-map. With this the parsing of exact same information from ACPI PPTT and /cpu-map DT node aligns well. The only exception is that the last level cache id information can be inferred from the same ACPI PPTT while we need to parse CPU cache nodes in the device tree. llc_id is not handled as part of these changes. P.S: I have not cc-ed Greg and Rafael so that all the users of arch_topology agree with the changes first before we include them. Sudeep Holla (4): arch_topology: Don't set cluster identifier as physical package identifier arch_topology: Set thread and core siblings only within the cluster arch_topology: Set cluster identifier in each core/thread from /cpu-map arch_topology: Add support for parsing sockets in /cpu-map drivers/base/arch_topology.c | 48 +++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 11 deletions(-) -- 2.36.1