Received: by 10.223.164.221 with SMTP id h29csp2590268wrb; Thu, 2 Nov 2017 13:39:24 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SFpqwInWZloME2W9D8wQKOCtdQ7cBQ+6JEJNQ93zxiElmJySTBYCndYgPsX0ubd1WTPySD X-Received: by 10.99.51.205 with SMTP id z196mr4908046pgz.374.1509655164774; Thu, 02 Nov 2017 13:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509655164; cv=none; d=google.com; s=arc-20160816; b=YFG0qL0XjcL8krjpOnBlZaRzOxwkwAfdhmCcT81J5XDCNLyaFN0JnbLCHYZsSqDVh4 LaoKW74civ5vAA/NXuXYCZswmWCLQHdKIWPbzJKKKq580riS8YOF/sSKr7/Yw2+h6Cc3 UyoUPxwKckx4iToLyE7gtRjYnQLNcGvddce0yd1doIXbehwjLqOo65x3dU64n0+6btbl EAJls6e6IFeGW8ENnv1bmfU9QoQ0gJ8Xz8veNpp5/H0e3nDdugy3rorKCe/ub5UtU9KV jp35fWejD1ZFbgkG8g3PLE9da1rf/oFShd398ewuhd1bDFvQXk+3ndl4BrNfiIpv0UKJ 4F9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=wBQTdxoCnquB+A6s5XqFbvsrhdZi3gH3k9nio9zg9yI=; b=iekN8Xa1ydOWzNBhekSrWBsEiEvZFoWwqykN4pJOOsID/hfRZpQlW/Zv9xnx+XlwIN oi6u5hEBxGv2OZKP9JHQr0ymXpXMVIm+lfaDci3En00XquwGg9ErEF+7/IBRJMYcz7if eXF+GcUrYPoFHerKKuVAtfSpMHDEU8GkPuETuTzp9GIK2Wq929/dwB9+GxP6OIkDVxVm IbRnd49vnMWx4iUtCyKeZ5oleGCsNaFOBUvVMorvSr50DJHf7nJ94ph2932E1GahebVD VBRx9LIunhI7DaGQs+hNXibQMGvE7NV/wCBVIYohXEeHRhW6qGeorJIAlZ3IiXUQIj7e RJlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cZLfWFUI; dkim=pass header.i=@codeaurora.org header.s=default header.b=C6PuwpLo; 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 e187si4468532pfg.268.2017.11.02.13.39.11; Thu, 02 Nov 2017 13:39:24 -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=cZLfWFUI; dkim=pass header.i=@codeaurora.org header.s=default header.b=C6PuwpLo; 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 S964845AbdKBUid (ORCPT + 99 others); Thu, 2 Nov 2017 16:38:33 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41080 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934115AbdKBUic (ORCPT ); Thu, 2 Nov 2017 16:38:32 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A3313607C7; Thu, 2 Nov 2017 20:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509655111; bh=QjfZmnuEuAT9K6aTewMvM/QVoTvBH4r7omRwaWYH9Q0=; h=Cc:Subject:To:References:From:Date:In-Reply-To:From; b=cZLfWFUIRys21KaB6XITZTU1yIW7tS6hBnLXTvlhnPF2ra7/KtEWpTIpU+3f+Q8Y4 q4gl0tWdoE59mHqNa1t+FlK5B8/8ZND4Rd8KS8yYnwZvzwq0Q0PrtHvHxgncy3KR9f CzzuNv5lZG7JE4zuGP84uQopARQPFj7rQ6Irey0Y= 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 [10.235.232.91] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nleeder@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C240E601EA; Thu, 2 Nov 2017 20:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509655109; bh=QjfZmnuEuAT9K6aTewMvM/QVoTvBH4r7omRwaWYH9Q0=; h=Cc:Subject:To:References:From:Date:In-Reply-To:From; b=C6PuwpLowUEwe8lfbDAtw49oLjnXgBAQZtks4OA4g+AgWmevhC+TlzYNunoRWRLJ5 6tjyly0arXdq6uw6xupBMPB6CrDSpfy2qf2usIZYw9P46W0iXC3PxFpXYbWk2TeS2a H9WiVU6JMcjtPgacjVVyXw7IakaXYcFRYQ9hCl8g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C240E601EA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=nleeder@codeaurora.org Cc: nleeder@codeaurora.org, Will Deacon , Mark Rutland , Mark Langsdorf , Jon Masters , Timur Tabi , linux-kernel@vger.kernel.org, Mark Brown , Mark Salter , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/2] arm64 SMMUv3 PMU driver with IORT support To: Yury Norov References: <1501876754-1064-1-git-send-email-nleeder@codeaurora.org> <20171031233352.5232hzebwek6avzi@yury-thinkpad> From: "Leeder, Neil" Message-ID: <5db10f59-e2dc-cb03-0950-58e14eac16e5@codeaurora.org> Date: Thu, 2 Nov 2017 16:38:27 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171031233352.5232hzebwek6avzi@yury-thinkpad> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yury, On 10/31/2017 7:33 PM, Yury Norov wrote: > Hi Neil, > > On Fri, Aug 04, 2017 at 03:59:12PM -0400, Neil Leeder wrote: >> This adds a driver for the SMMUv3 PMU into the perf framework. >> It includes an IORT update to support PM Counter Groups. >> >> IORT has no mechanism for determining device names so PMUs >> are named based on their physical address. >> >> Tested on Qualcomm QDF2400. perf_fuzzer ran for 4+ hours >> with no failures. >> >> Neil Leeder (2): >> acpi: arm64: add iort support for PMCG >> perf: add arm64 smmuv3 pmu driver >> >> drivers/acpi/arm64/iort.c | 54 +++ >> drivers/perf/Kconfig | 9 + >> drivers/perf/Makefile | 1 + >> drivers/perf/arm_smmuv3_pmu.c | 823 ++++++++++++++++++++++++++++++++++++++++++ >> include/acpi/actbl2.h | 9 +- >> 5 files changed, 895 insertions(+), 1 deletion(-) >> create mode 100644 drivers/perf/arm_smmuv3_pmu.c > > I try to run your driver on ThunderX2, but perf list doesn't show new > events, and example in description in patch 2 also doesn't work: > yury@VAL1-25:~/linux$ tools/perf/perf stat -e smmu_0_ff88840/transaction,filter_enable=1, filter_span=1,filter_stream_id=0x42/ -a pwd > event syntax error: '..ter_enable=1,' > \___ parser error > Run 'perf list' for a list of valid events > > Usage: perf stat [] [] > > -e, --event event selector. use 'perf list' to list available events > > I run v4.14-rc7 kernel plus this series. The config is attached. I > found that platform_match() never return 1 for arm-smmu-pmu and so > the driver never probed. > > Maybe it's my local configuration issue? Thanks for testing this driver. As some of the review comments pointed out, there are some changes needed which will be addressed in a future patchset. Notably the IORT needs updating to handle the two base addresses. The current driver assumes the second memory area is adjacent to the first, which may not be the case in all implementations. In order to make the driver probe correctly, you'll need to update your ACPI tables with entries for PMCG, node type 0x5. This ACPI information will include the two base addresses. I've heard that the updated spec which will include the second memory area will be available soon. At that point I will release another patchset for review. Neil -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From 1582818110438722842@xxx Tue Oct 31 23:36:19 +0000 2017 X-GM-THRID: 1574831973672201036 X-Gmail-Labels: Inbox,Category Forums