From patchwork Sat Aug 5 00:11:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 109470 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1999883obb; Fri, 4 Aug 2017 17:12:08 -0700 (PDT) X-Received: by 10.99.139.66 with SMTP id j63mr4049031pge.266.1501891928470; Fri, 04 Aug 2017 17:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501891928; cv=none; d=google.com; s=arc-20160816; b=T2lxs57Rw/f4DgerEHHI9TZrUzr0lShxUfmEEIzxn3FjyU1MWOwFmjilJo4hVzoNyF dG21Ey0CIIO+VTMFT/AIbKKPjBSuE0G2qDa3YerafyKndqCPVzBj1n2+JoSEzDut3CqF 6NJlJPSxByirklN4sSDVbqP4oSAsiR/KdIp73otibQUbl8XlGHw3fXaXxQSIFaJGVb6E Y9kfrElXpSOpJVaOCR3WqIkyt+/Mi90B8Hv6+cLPhxHHGNiTk4qBFxtXEYIEwgijcdIk FKKOT2dGnqtb0cuGIAtAIkXea7iYXpTyFu7AyRwp4geF0ZNuh4QpdNuMLE0/xQXX7FqF alVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ekgpEd9Xr4ZomlbLAauRi7b0Ha7WXn3KPVDi1/roUxc=; b=OBmeCROIZryBNT91El7fSnaOL3fsaX041EC7VhdUfB4PqEYXj5BgbuEvIvyUcCn4LD EZJaQXqGWHze2xaqemcGwvlnpHZGYknSpmm9vopACf8OjjGiBYt3XQZcS3Zfr9pPY49c 0o9N1ry5RbDx0ICj1xSqyUWK2lbB7D9I/0qPWxyefjg0CDxDyqrXA3nQnFxbpUqRz+ZH 0x9SatoYFaATOKY1m4ScYY502Fgn/ZXSZ0Vwh/z7i8hA21esNzdpc0+jAcrxasyPC2qb G8GtiQgxotU1sitL8ENWq7Au90qV7n/ZQxSm9nFvzh1LA1TjRswDJZMYhWB4zGp3LQVI 2P5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a59si1847411plc.837.2017.08.04.17.12.08; Fri, 04 Aug 2017 17:12:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753402AbdHEAMD (ORCPT + 7 others); Fri, 4 Aug 2017 20:12:03 -0400 Received: from foss.arm.com ([217.140.101.70]:32976 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbdHEAMB (ORCPT ); Fri, 4 Aug 2017 20:12:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 35FDF80D; Fri, 4 Aug 2017 17:12:01 -0700 (PDT) Received: from beelzebub.ast.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B82903F577; Fri, 4 Aug 2017 17:12:00 -0700 (PDT) From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Cc: linux-acpi@vger.kernel.org, sudeep.holla@arm.com, hanjun.guo@linaro.org, lorenzo.pieralisi@arm.com, will.deacon@arm.com, catalin.marinas@arm.com Subject: [RFC 0/4] Parse ACPI/PPTT for cache information Date: Fri, 4 Aug 2017 19:11:55 -0500 Message-Id: <20170805001159.12769-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.9.4 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org ACPI 6.2 adds the Processor Properties Topology Table (PPTT), which is used to describe the processor and cache topologies. Ideally it is used to extend/override information provided by the hardware, but right now ARM64 is entirely dependent on firmware provided tables. This patch parses the table for the cache topology only. Its quite trivial to add processor/cluster/???/socket level parsing as well, but that information isn't as useful as the already provided NUMA SRAT/SLIT information which provides relative distances. The one useful thing, is the number of physical sockets but due to the way arm64 considers "clusters" to be sockets, a larger discussion is required here. An example of lstopo with this patch: [root@mammon-juno-rh ~]# lstopo-no-graphics Machine (8072MB) Package L#0 + L2 L#0 (1024KB) L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1) L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2) L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3) Package L#1 + L2 L#1 (2048KB) L1d L#4 (32KB) + L1i L#4 (48KB) + Core L#4 + PU L#4 (P#4) L1d L#5 (32KB) + L1i L#5 (48KB) + Core L#5 + PU L#5 (P#5) HostBridge L#0 PCIBridge PCIBridge PCIBridge PCI 1095:3132 Block(Disk) L#0 "sda" PCIBridge PCI 11ab:4380 Net L#1 "enp8s0" Jeremy Linton (4): drivers: base: cacheinfo: Add support for ACPI based firmware tables arm64: cacheinfo: Add support for ACPI/PPTT generated topology ACPI/PPTT: Add Processor Properties Topology Table parsing ACPI: Enable PPTT support on ARM64 arch/arm64/kernel/cacheinfo.c | 23 ++- drivers/acpi/arm64/Kconfig | 3 + drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/pptt.c | 389 ++++++++++++++++++++++++++++++++++++++++++ drivers/base/cacheinfo.c | 15 +- include/linux/cacheinfo.h | 1 + 6 files changed, 422 insertions(+), 10 deletions(-) create mode 100644 drivers/acpi/arm64/pptt.c -- 2.9.4 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html