From patchwork Tue Jul 24 11:45:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shameerali Kolothum Thodi X-Patchwork-Id: 10541911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27D971805 for ; Tue, 24 Jul 2018 11:46:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 144801FFB2 for ; Tue, 24 Jul 2018 11:46:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 080EF28711; Tue, 24 Jul 2018 11:46:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A6DD21FFB2 for ; Tue, 24 Jul 2018 11:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=3CWeGYSKd6Ga5azU2SPFPyXmF6Bd4DVh4nS61z6cMVI=; b=HdYlnMvxxlHK9E N6rM9AB/yd9d/pMZbNvarszrPevzBfqUrsgk516m1wocKAr7NeN5C8s6ujxg/bCESR+WR/ie81EeD Lc+37pO6xQePTKO3iV3GMY7yquV98UxfW0LpyorZSXmRMJZrmjNUoHZBykpGzRfiaQ7Ld/jNG29Wc xjt60ApucX1s5qwchZFjPpuJw6+lSQUzdlTJwEJMRK6qwDErn5uryjg8hWvhDlmb9qmYuov4D3TH+ HBE4oyJH9gU3OIJqCXnnk6ur/Pwnbu//afYFvFr1I91G7SSF2/psOHA/WaI47NBEiqioube0AIYD4 epsI1eArc5sKNeqevDBA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhvm7-0007AZ-CS; Tue, 24 Jul 2018 11:46:43 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhvm2-0006yF-Tw for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 11:46:41 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D20DA50A3C598; Tue, 24 Jul 2018 19:46:19 +0800 (CST) Received: from S00345302A-PC.china.huawei.com (10.202.227.237) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.382.0; Tue, 24 Jul 2018 19:46:13 +0800 From: Shameer Kolothum To: , Subject: [PATCH v2 0/4] arm64 SMMUv3 PMU driver with IORT support Date: Tue, 24 Jul 2018 12:45:11 +0100 Message-ID: <20180724114515.21764-1-shameerali.kolothum.thodi@huawei.com> X-Mailer: git-send-email 2.12.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.202.227.237] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_044639_202124_950CB1AC X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, vkilari@codeaurora.org, neil.m.leeder@gmail.com, pabba@codeaurora.org, john.garry@huawei.com, will.deacon@arm.com, rruigrok@codeaurora.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, guohanjun@huawei.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 X-Virus-Scanned: ClamAV using ClamSMTP This adds a driver for the SMMUv3 PMU into the perf framework. It includes an IORT update to support PM Counter Groups. This is based on the initial work done by Neil Leeder[1] SMMUv3 PMCG devices are named as arm_smmu_v3_x_pmcg_y where x denotes the associated smmuv3 dev id(if any) and y denotes the pmu dev id. Usage example: For common arch supported events: perf stat -e arm_smmu_v3_0_pmcg_6/transaction,filter_enable=1, filter_span=1,filter_stream_id=0x42/ -a pwd For IMP DEF events: perf stat -e arm_smmu_v3.0_pmcg.6/event=id/ -a pwd Sanity tested on HiSilicon platform. Further testing on supported platforms are very much welcome. v1 --> v2 - Addressed comments from Robin. - Added an helper to retrieve the associated smmu dev and named PMUs to make the association visible to user. - Added MSI support for overflow irq [1]https://www.spinics.net/lists/arm-kernel/msg598591.html Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver Shameer Kolothum (2): acpi: arm64: iort helper to find the associated smmu of pmcg node perf/smmuv3: Add MSI irq support drivers/acpi/arm64/iort.c | 179 +++++++-- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 901 ++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi_iort.h | 4 + 5 files changed, 1063 insertions(+), 31 deletions(-) create mode 100644 drivers/perf/arm_smmuv3_pmu.c