Received: by 10.223.185.116 with SMTP id b49csp581282wrg; Fri, 23 Feb 2018 03:36:56 -0800 (PST) X-Google-Smtp-Source: AH8x226i2Lvfdup7sVXpmV0iWjdGjLzfW2EXf/GPYMlISGverZ5gCCEkdVv6xC+nVv3YPb9tns2n X-Received: by 10.98.68.129 with SMTP id m1mr1429542pfi.171.1519385816368; Fri, 23 Feb 2018 03:36:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519385816; cv=none; d=google.com; s=arc-20160816; b=nWaH+hQldE6YELxzsLbmdXyjnycn7x/rIWsaO622EQpeV+LfnoMmg7R8T2hGgp0GFd rhM8CyCup9xADX0b/NkceAq6sqqzPSpDGtB0D8JxB/PBwphws7Lbkp2imanBKiGCRdRp lJnxAUoJFaniJrrMivZl3W1SRhICQW7M6XLAQNsJGsRn9Cb9ixpAspK2BpXDj98Z7oGx WPs+Z73WxBuC57wo8h/KJQSfXV0BLcI0Ai1pjDRdEMy57Y5PATM0fBWnl913VI2zv5+p uS5xkMgLXjznq2Rmk/xh4M/0049KUR5HaXCXq6jF0aMsK9qghoFvrDALFuQPvAhF8b33 T2SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ipyswxVQkm2MwtLkSp76put9snI2UHYfpv/nFM6Qavs=; b=x/FnzxPeXDOIb7+4vfhCQOM4CEaLpaMGWqxnhgolTcGhARDhFQPFDIRp4jeDmFGH4c cHMds+AIPy9KmP8VcpEVtS2IAwR1KCTBUrpegxsRVirBMXNpdkYmfbhJmlSWUX7RidUj TXa1aEI10oIa383QaM6vfLwfTT0bumZsJhwocFh+O1vO1g+y7BekQot0wzIMLS07FExZ KBUR0C+A2I/RZnyZ1onIGM+jaA5V9kfrW2rBVMvvbTdQsXFJ8LZQRBSeBlxw3IGsFQH+ 7dT+EVRX7uBv2C0cVV8uLb5xpYhdVsfDL79Y2QgA8Xgvf7gZod+qHw7WCUkfO1uJxOQU rQsQ== ARC-Authentication-Results: i=1; mx.google.com; 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 t18-v6si1619969plo.407.2018.02.23.03.36.40; Fri, 23 Feb 2018 03:36:56 -0800 (PST) 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; 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 S1751407AbeBWLgB (ORCPT + 99 others); Fri, 23 Feb 2018 06:36:01 -0500 Received: from foss.arm.com ([217.140.101.70]:53150 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbeBWLgA (ORCPT ); Fri, 23 Feb 2018 06:36:00 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 017A81529; Fri, 23 Feb 2018 03:36:00 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BBEA3F25C; Fri, 23 Feb 2018 03:35:57 -0800 (PST) Date: Fri, 23 Feb 2018 11:35:52 +0000 From: Mark Rutland To: Saravana Kannan Cc: Suzuki K Poulose , will.deacon@arm.com, robh@kernel.org, sudeep.holla@arm.com, mathieu.poirier@linaro.org, peterz@infradead.org, jonathan.cameron@huawei.com, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, leo.yan@linaro.org, frowand.list@gmail.com, linux-arm-kernel@lists.infradead.org, avilaj@codeaurora.org Subject: Re: [PATCH v11 8/8] perf: ARM DynamIQ Shared Unit PMU support Message-ID: <20180223113552.2gn27h4uxbpo5zoq@lakrids.cambridge.arm.com> References: <20180102112533.13640-1-suzuki.poulose@arm.com> <20180102112533.13640-9-suzuki.poulose@arm.com> <5A8E2BCE.3050509@codeaurora.org> <20180222113352.oeedj7upx3zxvdcc@lakrids.cambridge.arm.com> <5A8F2A4F.5020105@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A8F2A4F.5020105@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 12:38:39PM -0800, Saravana Kannan wrote: > On 02/22/2018 03:33 AM, Mark Rutland wrote: > > On Wed, Feb 21, 2018 at 06:32:46PM -0800, Saravana Kannan wrote: > > > I'm not exactly sure if we can add entries to perf_type_id. If that's > > > allowed maybe we need to add something line PERF_TYPE_DSU and use that? > > > > > > Or if that's not allowed then would it be better to offset the DSU PMU > > > events by some number (say 0x1000) and then delete the event type check or > > > pass PERF_TYPE_RAW to perf_pmu_register()? > > > > As above, neither of these should be necessary. > > For the userspace interface. How about the kernel interface though? > perf_event_create_kernel_counter() takes attr.type as an input. But there's > no way to look up the DSU PMU's "type". There is no lookup mechanism currently. I take it you want to use DSU events from a kernel module? It would be possible to have a simlar name -> type lookup mechanism kernel-side, if necessary. Thanks, Mark.