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: 11822521 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77A8914D5 for ; Thu, 8 Oct 2020 09:32:11 +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 34300206E5 for ; Thu, 8 Oct 2020 09:32:11 +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 34300206E5 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+patchwork-linux-arm=patchwork.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-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.35 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [45.249.212.35 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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(-)