From patchwork Thu Oct 8 09:26:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 317466 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1171846ilm; Thu, 8 Oct 2020 02:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy319623vkymJEsZuIeLHeiEgnxzY0Jt6PXxJ+dSv6941fb0YneK1oFi2JmSgXRRrXiKkeO X-Received: by 2002:a50:88c6:: with SMTP id d64mr8111498edd.141.1602149427463; Thu, 08 Oct 2020 02:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602149427; cv=none; d=google.com; s=arc-20160816; b=MI/+I1HVIZ7Heac9k00ISUScbyPFTNL6fFUk7E5Rx0uvfrtscFvx81fgSZQZjJfzvL K5CySJHxM78FmslbghvNqfdjgOfzfBg+1JIvQx24mir0ECxJUDr/Gja3MyagRYE1I63+ 2cDaPUdENbtdlQ0p6NyPVwbr5442+rxbMMRb1VEQxKFjaO9jCqZPRzfeq6h2i8P2PCbp b59EEcFRbPfqy1m37resiXHJoAvDtm+xivS5tV9s+Wj3RXrHSpSwl+T1YDWp/fdK4Hba KwbadA1I0sn+NmaV2Rx+vuVHH2ub+CE2zFYaxKfiFoRTU7BHYkXNzTRE73wywIC3LcFc QOEA== 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=usFfrJdS0qZaIozA5plRu2G4EZTSQZcXOEG96VETTBGqeYC6OYRDlDoZd0ckYLRD7n nuuBxNfpU74+C5W9k/UUQwP6jCL8+gIEoXyFNwtD/v7sIDYmQ5YX5k3NF53aNL2MJb1z +W+I+3+mIxyXG5JJ3JJruKb5ZcCy9NyWfm9KJYyfAeECI1uDA4ZY7etB27SaSkjnwo17 qWQlMbVb/oS7GjCQX8/AWzR/zVES23vXiChcAgJJ5GhkQvb5lcyCDX4+dhzlHASWw0b7 sTI89+pgWuTGHzLM0iIqeihvGxcfwZUw1UpJVzCtfPKaA7G2h5FsPz/e1TU7J8slKTrd S89Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 c93si3155656edf.452.2020.10.08.02.30.27; Thu, 08 Oct 2020 02:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbgJHJaS (ORCPT + 6 others); Thu, 8 Oct 2020 05:30:18 -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 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@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