From patchwork Wed Jul 6 12:46:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 1652981 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=B2o59h+K; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LdK7R0zXQz9ryY for ; Wed, 6 Jul 2022 22:47:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mpf3yI5FSapO1Z/4JGcLtT8c76LnTCF52Q2KONXxF/o=; b=B2o59h+KTUFjOH zX/QpDgYcDQw66gQ9sW3z4XM4hF7kaQITFoClRT6AdUvEyKiB3JK6zqGuc8iztJ9IatB3+1bjymP3 n2IzyT+huitkJm00Ka4hz7Q4zgcQPW3xAVDkcXCY9X2ZdkIhl5uxGIpfOC4wCkGHKrMABn+wGkG7g eXbR3DOqQHZQRpf3iIlx6ALjUo8gwOMvDxTpT/qD+bhmuw/Hylun48c+O0hsyhIcyNaTjfsz7l0la UrjKp7fXsV10iaY9hwl/V9wPNlYkOMUUYd43zI4XJLRXl2A1HoQw1tLI3b1fs+o+xrT0OFl/xkTmP Pk+fiQ51HabD2am/sVyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o94Qn-00A0rI-2p; Wed, 06 Jul 2022 12:47:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o94Qi-00A0pJ-Oh; Wed, 06 Jul 2022 12:46:58 +0000 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 9F2BF106F; Wed, 6 Jul 2022 05:46:53 -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 201873F792; Wed, 6 Jul 2022 05:46:51 -0700 (PDT) From: Sudeep Holla To: Greg Kroah-Hartman Cc: Sudeep Holla , ALKML , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] cacheinfo/arch_topology: Updates for v5.20 Date: Wed, 6 Jul 2022 13:46:44 +0100 Message-Id: <20220706124644.2276077-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_054656_934821_B2F07E51 X-CRM114-Status: GOOD ( 19.24 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Greg, This is my first pull request to you, not sure if you are open to pull request or prefer pulling the patch series directly. I am fine either way. You can ignore this and pull the patches from[1] if yo [...] Content analysis details: (-5.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [217.140.110.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Hi Greg, This is my first pull request to you, not sure if you are open to pull request or prefer pulling the patch series directly. I am fine either way. You can ignore this and pull the patches from[1] if you prefer. Most of these changes are in -next for almost 2 weeks with small update to fix issue reported on RISC-V last week. The small changes in ACPI and arm64 are acked-by Rafael and Catalin. Regards, Sudeep [1] https://lore.kernel.org/all/20220704101605.1318280-1-sudeep.holla@arm.com/ -->8 The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56: Linux 5.19-rc1 (2022-06-05 17:18:54 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git tags/arch-cache-topo-5.20 for you to fetch changes up to 7128af87c7f1c30cd6cebe0b012cc25872c689e2: ACPI: Remove the unused find_acpi_cpu_cache_topology() (2022-07-04 16:23:23 +0100) ---------------------------------------------------------------- cacheinfo and arch_topology updates for v5.20 These are updates to fix some discrepancies we have in the CPU topology parsing from the device tree /cpu-map node and the divergence 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. The current assignment of generated cluster count as the physical package identifier for each CPU is wrong. The device tree bindings for CPU topology supports sockets to infer the socket or physical package identifier for a given CPU. It is now being made use of you address the issue. These updates also assigns the cluster identifier as parsed from the device tree cluster nodes within /cpu-map without support for nesting of the clusters as there are no such reported/known platforms. In order to be on par with ACPI PPTT physical package/socket support, these updates also include support for socket nodes in /cpu-map. 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. The cacheinfo changes here is to enable the re-use of the cacheinfo to detect the cache attributes for all the CPU quite early even before the scondardaries are booted so that the information can be used to build the schedular domains especially the last level cache(LLC). ---------------------------------------------------------------- Ionela Voinescu (1): arch_topology: Limit span of cpu_clustergroup_mask() Sudeep Holla (20): ACPI: PPTT: Use table offset as fw_token instead of virtual address cacheinfo: Use of_cpu_device_node_get instead cpu_dev->of_node cacheinfo: Add helper to access any cache index for a given CPU cacheinfo: Move cache_leaves_are_shared out of CONFIG_OF cacheinfo: Add support to check if last level cache(LLC) is valid or shared cacheinfo: Allow early detection and population of cache attributes cacheinfo: Use cache identifiers to check if the caches are shared if available cacheinfo: Align checks in cache_shared_cpu_map_{setup,remove} for readability arch_topology: Add support to parse and detect cache attributes arch_topology: Use the last level cache information from the cacheinfo arm64: topology: Remove redundant setting of llc_id in CPU topology arch_topology: Drop LLC identifier stash from the CPU topology arch_topology: Set thread sibling cpumask only within the cluster arch_topology: Check for non-negative value rather than -1 for IDs validity arch_topology: Avoid parsing through all the CPUs once a outlier CPU is found arch_topology: Don't set cluster identifier as physical package identifier arch_topology: Set cluster identifier in each core/thread from /cpu-map arch_topology: Add support for parsing sockets in /cpu-map arch_topology: Warn that topology for nested clusters is not supported ACPI: Remove the unused find_acpi_cpu_cache_topology() arch/arm64/kernel/topology.c | 14 ----- drivers/acpi/pptt.c | 40 +----------- drivers/base/arch_topology.c | 102 +++++++++++++++++++++++------- drivers/base/cacheinfo.c | 143 +++++++++++++++++++++++++++--------------- include/linux/acpi.h | 5 -- include/linux/arch_topology.h | 1 - include/linux/cacheinfo.h | 3 + 7 files changed, 175 insertions(+), 133 deletions(-)