Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1457242pxf; Fri, 9 Apr 2021 08:53:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxB6thcvqaDHAcGEAKKat6ZOGw5X37ahdJhZ9KCJInQd0AucPd7mnXuOF+JgwMVDowHm0qf X-Received: by 2002:a17:902:ed84:b029:e7:1f2b:1eb4 with SMTP id e4-20020a170902ed84b02900e71f2b1eb4mr13752293plj.74.1617983582439; Fri, 09 Apr 2021 08:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617983582; cv=none; d=google.com; s=arc-20160816; b=Ue1p4+6VpXdJY88Jam4Ub1VT3fIViJI8GyePZ+A1jNwXURtjAE/4mBGAeLCff/HXXy stRANFj1PXmB3MZLOA4QiXegRIAxxnhaJtSgeXPyYHGeM/mai0uRHLhKbWgn7em2sze+ SvuMjf8KH/RyTHWusF6DV5YpiDQI9jpon00p4ePSToO5iUYZZBMokXs3kP2iRd6SUcWg Ri7f16A1RaBW8W+jVRm/1fVFWORZXBICV3VQUvHTjHPpXAj1xtxBMiKrGW/zmboC1BIm GwRzZrQAG3S8361xor5UY+JTPaf9SOuKQQSjZjpVXCdet6ZoSlPMWxp56NQ4Gq78Er3g 5qkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KRifnXSl4b8Fwo8PrSOvt4Qdm+NxRg+4mE/wKXN8m2s=; b=ReMPMaSh61efHkz51JYUyPe9OL6no+FS8n93LIJx8PjCt2OhYrKi8YYe5MOj6fko4f IqsiQidOvUGfY0MeG5eRC3EdP2WZdp5yUfPJYtgsLniZ5tWCtD/qEV7DMZUU6EMnZMN9 wYl1NniOs8sE9jWcFwngtN6Jn0rKjj01MLfQnR/SBtTi8QASMh3FriXC+5tfrJdRDLea ALktDGU6eid74fLi729BRe/qqG/DpmAWxc1v+HWD7e0ClcaKcquKfi5iZ3xIIfX4oZg6 vcoQEYI2wUuEqHdhSBmQfTzyvRz7zR8ApVvgFX1nnOUO7hKoVVsCnMrcfRcntV6i6v76 QXRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=LyrZC9UJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc4si2541112plb.360.2021.04.09.08.52.49; Fri, 09 Apr 2021 08:53:02 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=LyrZC9UJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232855AbhDIPwY (ORCPT + 99 others); Fri, 9 Apr 2021 11:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbhDIPwY (ORCPT ); Fri, 9 Apr 2021 11:52:24 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE17C061760 for ; Fri, 9 Apr 2021 08:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KRifnXSl4b8Fwo8PrSOvt4Qdm+NxRg+4mE/wKXN8m2s=; b=LyrZC9UJlydTi3K20hq3lVUXCj qIIEhCwJsqLscxx8bob6UIzJlzekhdQdmv1DLriCNLyeumJ56f8jmPJhvuN+HHhV+gitB/Sz/sBAV iyL9Ajy+/3pIdqaWbLy2quxlUgCLPOy1zI+Qq2eJTKNqFp8kf5NA1kE+npdfcpF0XiJMEiNDaPlcq LSNLIuYV0VnKR/XvRTy3GLgkiIs0QuvasSonMC2QNdNjhnhiCHCybP10vkc8mJO3+rCXW+IQTBRUi 31gxC9HHLWRgsrcGrfuIhbiLusZdwYypD4CzA+5nrb2C7dKnsoKbWFnJIYoIvXAWYQOC2LsyzF+M0 CfhQjVTw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lUtQL-0012t5-De; Fri, 09 Apr 2021 15:51:57 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 877D330001B; Fri, 9 Apr 2021 17:51:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 711B82BE951AE; Fri, 9 Apr 2021 17:51:56 +0200 (CEST) Date: Fri, 9 Apr 2021 17:51:56 +0200 From: Peter Zijlstra To: "Liang, Kan" Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, acme@kernel.org, tglx@linutronix.de, bp@alien8.de, namhyung@kernel.org, jolsa@redhat.com, ak@linux.intel.com, yao.jin@linux.intel.com, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, ricardo.neri-calderon@linux.intel.com, Mark Rutland Subject: Re: [PATCH V5 21/25] perf: Introduce PERF_TYPE_HARDWARE_PMU and PERF_TYPE_HW_CACHE_PMU Message-ID: References: <1617635467-181510-1-git-send-email-kan.liang@linux.intel.com> <1617635467-181510-22-git-send-email-kan.liang@linux.intel.com> <11ed193e-75f9-c060-b757-350612b694aa@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11ed193e-75f9-c060-b757-350612b694aa@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 11:24:07AM -0400, Liang, Kan wrote: > diff --git a/include/uapi/linux/perf_event.h > b/include/uapi/linux/perf_event.h > index ad15e40..7ec80ac9 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -38,6 +38,20 @@ enum perf_type_id { > }; > > /* > + * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE > + * PERF_TYPE_HARDWARE: 0xEE000000AA > + * AA: hardware event ID > + * EE: PMU type ID > + * PERF_TYPE_HW_CACHE: 0xEE00DDCCBB > + * BB: hardware cache ID > + * CC: hardware cache op ID > + * DD: hardware cache op result ID > + * EE: PMU type ID it's: 0xEEEEEEEE00DDCCBB and 0xEEEEEEEE000000AA