Received: by 10.192.165.148 with SMTP id m20csp695472imm; Wed, 2 May 2018 07:22:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZobCWXkWye1M0Pb8ln4jocwMWPYo5gy2xIeURQpreOQkETeiC6q/ZkP+7tAJJiYQ0TZmhIv X-Received: by 2002:a17:902:758a:: with SMTP id j10-v6mr20309229pll.11.1525270961532; Wed, 02 May 2018 07:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525270961; cv=none; d=google.com; s=arc-20160816; b=z5H6wmCL5tCpPZsQwHqpDPFuhxLhpR5YVnfkUwjKupcm68AMCGMUJeQ5WbPvaBtHGj qTkHeDB4pdH/yaDVmcK0RkFyM1LCfRCurpFbH92aCd5A8+/wFLDQ4axK6LsN4pmYoYW3 Hl/P7c67Pe7qYllhfbX3ohOEkQbBGMF900ajjPZ5aS9PZJbygxxfZwsXPKiZ+cNuUgX/ zp8WqZA70GGr06OCDQ0seGKzpL0PESqc0h87pHiN5vk5KrhDXTEZbRGOvTVhnvKMMwUv w36cNXRxEd/zJbar9axInFjpUW9FlWIbq3hR15weKfwtApA8ch8vCzFU7UAp5eIBeITR tu2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=rLxFT1HfrSzHCqjvFiPLI7/t9zFkKMXhu5LQTbl0RKQ=; b=FNnII/KbwEKcvHpp2f7cD3oa26IIrSbM0AJPzSlZ6xZzohg3WDWIkXmoERgojfJANo G+0p/yFWdU+En3QZccHt/ciiDDsmN9Bk/BJXUhLFtxskN4kG9BFM7J6KCeiCWTixLFwF T88GH/vzcn47zuLu8Fh+b2Q1PN30jrGJR7VmSId0l7jmqa1H0yBWkKF1n/doIlua62jG hGKPAIKvCR6tYapY+tYiNEnB6oi5k3BjS9XQdLNPeGhpffbYsRIaQ1VJmgcJjULTxRFE S3vQeoddDaEVv/n7jWAgV3UIr4i7fJXjMFdshQmsofQo233ze8P00DHFgpQ+4N/YPRNx Uskw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WoEkCY6K; dkim=pass header.i=@codeaurora.org header.s=default header.b=erdDJYwe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si10937820plo.551.2018.05.02.07.22.26; Wed, 02 May 2018 07:22:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WoEkCY6K; dkim=pass header.i=@codeaurora.org header.s=default header.b=erdDJYwe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751566AbeEBOUf (ORCPT + 99 others); Wed, 2 May 2018 10:20:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46582 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365AbeEBOUa (ORCPT ); Wed, 2 May 2018 10:20:30 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 90D376028D; Wed, 2 May 2018 14:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525270829; bh=75/oSvKUv04q1euk747e62HozQPkmlayjCsyfOwjyCQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WoEkCY6Kx9ZtbZHz5Af2g41k/42xx+rLK0l0vTU0LCLPuM1loO0YepSxhTnL4eeDZ pAk+MMh6SQ1oy9f3J1T1zVR8xwNRY0vnjkEiz4bxZcduNGMktIcxewtQWPnwaGokFq m38ew3sR8KUtzr1JkU9e3ESP9uKSqkR4JQ9jPujo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 3514D607E4; Wed, 2 May 2018 14:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525270819; bh=75/oSvKUv04q1euk747e62HozQPkmlayjCsyfOwjyCQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=erdDJYwe+7Lj+6hpSFGEHtnPHLAX8mKJIOa3MbFSUM27CeC8SiTK2PfqKqGyWFpjW WgSX+tK2/1X9tOItxSLNPM1A8x7usoaTbpoaVmK03ARUksDHp25qg/G/0JSjKDLb+g /wuR9PWeSU1SHfU+UiMxqcf3hio26/80X8mZQfBE= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 02 May 2018 10:20:19 -0400 From: Agustin Vega-Frias To: Yisheng Xie Cc: Neil Leeder , Will Deacon , Mark Rutland , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Langsdorf , Mark Salter , Jon Masters , Timur Tabi , Mark Brown Subject: Re: [PATCH 2/2] perf: add arm64 smmuv3 pmu driver In-Reply-To: References: <1501876754-1064-1-git-send-email-nleeder@codeaurora.org> <1501876754-1064-3-git-send-email-nleeder@codeaurora.org> <883d32ce-6581-ecf6-5088-ecb238322ebe@huawei.com> <14f90cc6-f2c1-5a63-67c6-a5c8ddb4799e@gmail.com> Message-ID: <93b3738c386c528193b158da0f85fd27@codeaurora.org> X-Sender: agustinv@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-02 02:37, Yisheng Xie wrote: > Hi Neil, > > On 2018/4/1 13:44, Neil Leeder wrote: >> Hi Yisheng Xie, >> >> On 3/29/2018 03:03 AM, Yisheng Xie wrote: >>> >>> Hi Neil, >>> >>> On 2017/8/5 3:59, Neil Leeder wrote: >>>> + mem_resource_0 = platform_get_resource(pdev, IORESOURCE_MEM, >>>> 0); >>>> + mem_map_0 = devm_ioremap_resource(&pdev->dev, mem_resource_0); >>>> + >>> Can we use devm_ioremap instead? for the reg_base of smmu_pmu is >>> IMPLEMENTATION DEFINED. If the reg of smmu_pmu is inside smmu, >>> devm_ioremap_resource will failed and return -EBUSY, eg.: >>> >>> smmu reg ranges: 0x180000000 ~ 0x1801fffff >>> its smmu_pmu reg ranges: 0x180001000 ~ 0x180001fff >>> >> Just to let you know that I no longer work at Qualcomm and I won't be >> able to provide updates to this patchset. I expect that others from my >> former team at Qualcomm will pick up ownership. > > Thanks for this infomation. > > hi Agustin and Timur, > > Is there any new status about this patchset? > Hi, Apologies for the slow response. We are having some internal discussions about when/if to do this. I expect to have more clarity within a few weeks. For what is worth let me take the opportunity to outline the approach we would like to see for a V2 either developed by us or somebody else in the community: 1. Rework to comply with the IORT spec changes. 2. Rework probing to extract extra information from the IORT table about SMMU/device associations. With this information and some perf user space work I think it's possible to have a single dynamic PMU node and use a similar approach to what is used in the Coresight drivers to pass the device we want to monitor and for the driver to find the PMU/PMCG. E.g.: $ lspci 0001:00:00.0 PCI bridge: Airgo Networks, Inc. Device 0401 0002:00:00.0 PCI bridge: Airgo Networks, Inc. Device 0401 0002:01:00.0 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3] 0003:00:00.0 PCI bridge: Airgo Networks, Inc. Device 0401 0003:01:00.0 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3] # Monitor TLB misses on root complex 2 (no stream filter is applied) perf stat -a -e smmu/tlb_miss,@0002:00:00.0/ # Monitor TLB misses on a device on root complex 2 (derive the stream number from the RID) perf stat -a -e smmu/tlb_miss,@0002:01:00.0/ Thanks, Agustín -- Qualcomm Datacenter Technologies, Inc. on behalf of the Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.