From patchwork Fri Apr 26 22:03:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 162975 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1246496jan; Fri, 26 Apr 2019 15:03:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYbYPaXzQUtub4og7Kgclrywuvwk/TGZDDlcs/POK8vXCzXKcT5S2NETHESnHCmY9wf6xG X-Received: by 2002:a63:4241:: with SMTP id p62mr45970785pga.379.1556316203218; Fri, 26 Apr 2019 15:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556316203; cv=none; d=google.com; s=arc-20160816; b=Cly8hxVjn6EdQMreKL6mQ801HU3l9dY8u1v95gMYYf51tKAwovZBODxmgCJjWufeCo IgYI+zAJvHIsnyo6hIRhZZDNusiMYI6ziMbRlFY7axsF2y3VhmqVKuNtqnXi1JfeSt8Y 6DbYVXPxbaCe3zqVoPvP+gI91YtDP/hkLD8AJnFbJzgQNSlcq9LlJXXd7wmlsPHqEtso RLpaJJBvFCY/5FkPVY1nY3RvtVj7Bw4WkHdkB0gCW85+T/5djKkgzX5RqtjGgB7YNYiC xTCSHVzIEwCwHIQyNSdE1jLo0L/qY4Tv5kb/KYiP3SuRfUgb/kPdrkX5K6sCA6NqdRxC TqKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HG7fxbu0E/2R5fy8P2e2SN9yUC6bHfbT9dtmw8NspLg=; b=z2gko3aKna0UgM3uhRpqSkc/5GB6TO5VRqiOLihlBex0Ox/bc6zAmlAgduvEy/Qmj7 mrq+ZJHdRuVw0B5M5E2QKOpL7ChgArUy2jv6mrHyWlb1qc0dpOefyKt7TlnpdJjC8Cfw FdtzR3iwZ4GNVaFqz3h37A3JrQJcIMfZKKFIIlZ93ug8tvI9JjON3GeiG5+UMikqbFgK +NeaF4qmJ89g7oFrKH5BWJtjQCj1+kh0CsfWUqYj7KdgdFdgbegH3hRHVaeN6UbtGw/W a01e8pDseInNCdoE4anlkYHAyNMudge1lKGMKpM5UQq/PI4q6LYs7SMueJOl/mB8W1NZ eJpQ== 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 a3si11946562pgm.455.2019.04.26.15.03.22; Fri, 26 Apr 2019 15:03:23 -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 S1727113AbfDZWDV (ORCPT + 9 others); Fri, 26 Apr 2019 18:03:21 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52844 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbfDZWDV (ORCPT ); Fri, 26 Apr 2019 18:03:21 -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 11076A78; Fri, 26 Apr 2019 15:03:21 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.29.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7A0493F557; Fri, 26 Apr 2019 15:03:20 -0700 (PDT) From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Cc: linux-acpi@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, linuxarm@huawei.com, john.garry@huawei.com, Jeremy Linton Subject: [PATCH v2 0/5] arm64: SPE ACPI enablement Date: Fri, 26 Apr 2019 17:03:04 -0500 Message-Id: <20190426220309.55654-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This patch series enables the Arm Statistical Profiling Extension (SPE) on ACPI platforms. This is possible because ACPI 6.3 uses a previously reserved field in the MADT to store the SPE interrupt number, similarly to how the normal PMU is described. If a consistent valid interrupt exists across all the cores in the system, a platform device is registered. That then triggers the SPE module, which runs as normal. This version also adds the ability to parse the PPTT for IDENTICAL cores. We then use this to sanity check the single SPE device we create. This creates a bit of a problem with respect to the specification though. The specification says that its legal for multiple tree's to exist in the PPTT. We handle this fine, but what happens in the case of multiple tree's is that the lack of a common node with IDENTICAL set forces us to assume that there are multiple non IDENTICAL cores in the machine. v1->v2: Wrap the code which creates the SPE device in a new CONFIG_ARM_SPE_ACPI ifdef. Move arm,spe-v1 device name into common header file Some comment/case sensitivity/function name changes. Jeremy Linton (5): ACPI/PPTT: Trivial, Modify the case of CPU ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens ACPI/PPTT: Modify node flag detection to find last IDENTICAL arm_pmu: acpi: spe: Add initial MADT/SPE probing perf: arm_spe: Enable ACPI/Platform automatic module loading arch/arm64/include/asm/acpi.h | 3 + drivers/acpi/pptt.c | 130 +++++++++++++++++++++++++--------- drivers/perf/Kconfig | 5 ++ drivers/perf/arm_pmu_acpi.c | 76 ++++++++++++++++++++ drivers/perf/arm_spe_pmu.c | 12 +++- include/linux/acpi.h | 5 ++ include/linux/perf/arm_pmu.h | 2 + 7 files changed, 196 insertions(+), 37 deletions(-) -- 2.20.1