Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1071764pxu; Thu, 8 Oct 2020 02:31:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1zgz68mG0ealEHf0f4e0EOBwj61JrG6q/TSivyKQ290jcSdyWSXjfGKQ4B7PTb1+hgInv X-Received: by 2002:a17:906:f2d2:: with SMTP id gz18mr7623069ejb.542.1602149510235; Thu, 08 Oct 2020 02:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602149510; cv=none; d=google.com; s=arc-20160816; b=HvYilU0AABX458v5whVSsbZJyFWiwSLmTzhG3TkGt6PL+WdLEqaK/QQ6CE93Tlnvyq q6QsDdVO718oUxQdRV4aQzImJ2H08fuzUdLi6Uns8CWfxfcm+FQxsia5a5F+PsT3ocTC 7RrG61QiHJBBVq/p/SZjTkyO+J/oRH6bb2VXJM4uLncAw/PTKctjHmAogaWk65NND/ND nrKS1vtwHyk2+iQ6/QC1TE09Q9Kr6kkcAsgVoBicPWcuG4vz4YO4ZxRee4S5FakI0N7I 6CNTO8KQ0QFZXeEX6aVQwXvJmyr+UWYU9Vvpn2AamKFFrzovGBXa5/e2jW7hY3NOYoMy MfyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=hSnQ+vLEvW1TvfALAVBwiaKyT0ztOQpHJ2NYiZ0uNmI=; b=aWJQpke9avoJE2orSQS4H6feVbWZAmWnyFp3Tcm2w52jfbdSy8eZyBkffP6K/bcv6P xp7M9EW/I0boaF7rCNuhVmtqx93tlop+TDVCFCGcEVzNiCp1kTHVwcczcCcH04P4FO+U uva+1ol/4J7s+ReMPviEza8YiNZpufRS/t1w8h4SlLfurzfV9KVwOsa0lsox/Mn6YNtW GTtGLJuPupmHEtQM47b1N4uodCr0E6pF/5LsA9dXca4Fz3pO1w7JDD1Ks/BTQygfXKZr PiMAEbhFHot/T5fei/vXFGZ3gV4Bj3X2VcZp+zGlwWNF/A4iC8NvtHHrsHs1RyOKjXTm kXdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si3249574edq.32.2020.10.08.02.31.26; Thu, 08 Oct 2020 02:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729077AbgJHJaV (ORCPT + 99 others); Thu, 8 Oct 2020 05:30:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35186 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727155AbgJHJaS (ORCPT ); Thu, 8 Oct 2020 05:30:18 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5B01BF31CD77A4671959; Thu, 8 Oct 2020 17:30:14 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Thu, 8 Oct 2020 17:30:04 +0800 From: John Garry To: , , , , , CC: , , , , , , , John Garry Subject: [PATCH v2 0/4] perf drivers: Add sysfs identifier file Date: Thu, 8 Oct 2020 17:26:17 +0800 Message-ID: <1602149181-237415-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To allow perf tool to identify a specific implementation of a PMU for event alias matching and metric support, expose a per-PMU identifier file. There is no standard format for the identifier string. It just should be unique per HW implementation. Typical methods to retrieve the information for the identifier string can include: - Hardcoding in the driver, matched via DT bindings compat string, ACPI HID, or similar - Directly from DT bindings property - Read from some HW identification register In this series, for the SMMUv3 PMU and HiSi uncore drivers, a HW ID register is read for the identifier. For the imx8 ddr driver, the identifier is hardcoded, matched via DT compat string. Joakim Zhang (2): bindings/perf/imx-ddr: update compatible string perf/imx_ddr: Add system PMU identifier for userspace John Garry (2): drivers/perf: hisi: Add identifier sysfs file perf/smmuv3: Support sysfs identifier file .../devicetree/bindings/perf/fsl-imx-ddr.txt | 3 ++ drivers/perf/arm_smmuv3_pmu.c | 39 ++++++++++++++++ drivers/perf/fsl_imx8_ddr_perf.c | 45 +++++++++++++++++-- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 16 +++++++ drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 16 +++++++ drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 16 +++++++ drivers/perf/hisilicon/hisi_uncore_pmu.c | 10 +++++ drivers/perf/hisilicon/hisi_uncore_pmu.h | 7 +++ 8 files changed, 149 insertions(+), 3 deletions(-) -- 2.26.2