Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp457167pxh; Tue, 9 Nov 2021 13:29:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwefUAH6fZb5VpNMbSx2IHDzJho2yE5PhdqRncxOdTKfUuK/RAkv/ybBsBO0RKEIc/l+d+c X-Received: by 2002:a5e:8701:: with SMTP id y1mr2490214ioj.80.1636493394464; Tue, 09 Nov 2021 13:29:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636493394; cv=none; d=google.com; s=arc-20160816; b=lPweIg0IY27cDmgAYk33fpH8PRhkZTVdPNHYiqrc4roNr0RrnBdD/xGLf6cGQCzCoi bx4nKte+NmXgSpuy2c4jMgcnvvloa0vdKhwfYLKEa6ZMiofz6G2s50DoUS2KEkksHTUD aWK8yFgbXyY5hA7tpOKncOuHlyZYQQcJkGze5+IM8JkiK1KgaQ2BVkeTYSHNNxT2Widt 4Dn/Yqt1Bu5+hR/dxaoiw2INXNIL3F0vQwk4bFXZZ7FVpkuKhR5nBotzwUaKJ1C9HHMy wqi1XcAy59+hgJevf6XBzHP/pP9kG5KY/qccKLOtdHIX3SR37niTlZoIl5dHwEo+Qo6D L9jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=qkMs5HLB1lEzagWDa0NZtaZhF3xNqqFyODaU3uZQfso=; b=gKMyr6+0YFZohteR+29xn78/58522uXhFmDb+qdmJfDCbQ7sFwrCoXxqz2M6xzlPZF xXDqmXTi7LjGQV+nijMcCNuG3vmmrK90Bg8sLUh+pdneZq/7RpK0Fz2DVssW8umdZ4y2 /xPiUHgmSSe3ISS1h4ecXzRjSLvJoBzAK75qOpFOCg6sNEu/1jwkbBeClPY28gfoqUBh 9575BqItCkjFScu/6b3/+6kTC5npX1kP1ENrLAsj9jasKfXWsHwp7OPPmB5hEjc+8sfo wvrm0I3Ys7xEeHfRWvpyPnlzq/hjA4hEVzHJaMMaiyFMtixFdsXHJxyVi8XWMBHKpcFo jZpg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si36613311ilf.149.2021.11.09.13.29.41; Tue, 09 Nov 2021 13:29:54 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343490AbhKILfE (ORCPT + 99 others); Tue, 9 Nov 2021 06:35:04 -0500 Received: from foss.arm.com ([217.140.110.172]:60554 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245757AbhKILe5 (ORCPT ); Tue, 9 Nov 2021 06:34:57 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E0C2ED1; Tue, 9 Nov 2021 03:32:11 -0800 (PST) Received: from [10.57.81.233] (unknown [10.57.81.233]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 63B2E3F7F5; Tue, 9 Nov 2021 03:32:10 -0800 (PST) Message-ID: <7213fdb0-b0ff-f851-87c6-7a55245cfcce@arm.com> Date: Tue, 9 Nov 2021 11:32:04 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Question: SMMUv3 PMU event aliasing Content-Language: en-GB To: John Garry , Leo Yan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "linux-arm-kernel@lists.infradead.org" References: <20211108121941.GC1267967@leoy-ThinkPad-X240s> <8b24f36b-6459-c13c-bf19-b9f588eb6b8e@huawei.com> From: Robin Murphy In-Reply-To: <8b24f36b-6459-c13c-bf19-b9f588eb6b8e@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-11-08 12:41, John Garry wrote: > On 08/11/2021 12:19, Leo Yan wrote: >> Hi John, >> >> [ + mailing list ] > > Hi Leo, > >> >> I'd like to confirm the latest upstream status for SMMUv3 PMU event >> aliasing. >> >> I see the patch set v6 of "perf pmu-events: Support event aliasing for >> system PMUs" [1] has been landed on the mainline kernel, and as an >> example, imx8mm DDR PMU has been supported as system PMU [2]. >> >> On the other hand, I can see patch set 5 contains the SMMUv3 PMU event >> aliasing with patch "perf vendor events arm64: Add Architected events >> smmuv3-pmcg.json" [3], but this patch was left out in patch set 6 and >> it's never landed on the mainline kernel. >> >> Could you share current status (or plan) for upstreaming SMMUv3 PMU >> event alias?  Or if there have any block issue to prevent merging the >> changes in the mainline kernel? > > This feature should be supported in the SMMUv3 PMU kernel driver and > perf tool. > > However it relies on the SMMU PMU identifier sysfs file to work. This > relies on SMMU_PMCG_IIDR being set, which is introduced latest spec, > which not much HW will support yet - see commit 2c255223362e. In theory > we don't need that for the fixed, non-IMPDEF events, but I did not > complicate perf tool with that mixed support. > > That's the reason for which I paused smmuv3-pmcg.json upstream in [3]. I > will revive that for new gen HW when concrete IMPDEF events known and > shared. FWIW, imp-def-events are readily available for the existing Arm implementations[1][2], and annoyingly we could trivially synthesise an IIDR value from their imp-def PIDR registers if only we knew that that was valid to do in the first place. I feel tempted now to resurrect Jean-Philippe's DT binding and have a quick hack at that, then maybe a much longer think about how to attempt it for IORT... Cheers, Robin. [1] https://developer.arm.com/documentation/100310/0202/Functional-description/Operation/Performance-Monitoring-Unit [2] https://developer.arm.com/documentation/101542/0001/Functional-description/Operation/Performance-Monitoring-Unit > > Thanks, > John > >> >> Thanks for your help! >> >> Leo >> >> [1] >> https://lore.kernel.org/lkml/1607080216-36968-1-git-send-email-john.garry@huawei.com/ >> >> [2] pmu-events/arch/arm64/freescale/imx8mm/sys/ddrc.json >> [3] >> https://lore.kernel.org/lkml/1604666153-4187-6-git-send-email-john.garry@huawei.com/ >> >> . >> > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel