From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74D15C433E7 for ; Thu, 8 Oct 2020 09:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25CD12168B for ; Thu, 8 Oct 2020 09:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729082AbgJHJaX (ORCPT ); Thu, 8 Oct 2020 05:30:23 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26B16C4727E for ; Thu, 8 Oct 2020 09:32:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C457206E5 for ; Thu, 8 Oct 2020 09:32:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ksNS4etd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C457206E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=MGHAH/fkGRNPFS+TrGq2ffVD9aidPDpAh+BHyxahM/w=; b=ksNS4etdKbl5ReMDv8H8PUyb2s SbQ93jHyMm10bXK5elU7GpNTmceU12uJDqjjYfl863S7Jsoz648t+EAVQw/xKaw7eIaHDu9OBTbsF OuRllZHr1klc+AVMTiEvWqG8sqZOpQo916nciwb2J979XyQNHCDx/w6JH6lTroetu1PJ1/Rvdmum0 RVasGNdhI6pPuouHcLZLXZ4wdRfJ8NdbaswtuJ6UX8uzfuideDuTY+HzG95NbVHWmjUXgMXrtaE3R mE5j5BmV/sFCUDlQf2KUb8qqwFVJqKeawIU/Gq+qrDIKEb9xP2nvwkgVNmAjU/NIeUkKwq2tghtOM rr0PpCaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQSFv-0001GK-G9; Thu, 08 Oct 2020 09:30:35 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQSFp-0001C6-7K for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2020 09:30:30 +0000 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: , , , , , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201008_053029_526591_10A804F2 X-CRM114-Status: UNSURE ( 8.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, irogers@google.com, John Garry , linuxarm@huawei.com, acme@kernel.org, linux-kernel@vger.kernel.org, jolsa@redhat.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel