From patchwork Tue Mar 12 17:34:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 13590447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86892C54E68 for ; Tue, 12 Mar 2024 17:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=03EZFsR80wi1sRwB1IyJ5ZDOiD9pSM8Dj1GSJkH4zyQ=; b=CCWEgmIZEhKp2c nvocpmfCx3NyHruw8wXuCpzK/hEXHVnObukCl26+9JdqylNzCnLUqZV1GZEyMxHCYHcu/JteMVToh 1PeTSl5OnWZy5eXLHCy7gJzofu3VZj0/K5ZkiKLNUIwEXRaWjD5xs9hwkNjPjAxVbNAoua8Er5Y13 K0LKA7KBskuwQnHunf3ZZ+T378N98A7cVZyfG8dX9+HjRISC2yCnosV/lDMl2Wr09igeDoGYSK/1r 2bJcqpfVZMldS3snLSLAPeOwfIUuIOOrJOqbqd0JtCFgQ0hKQ9Raf/H+aEwD6Ast6eHL4Pc0TY3LY 7hP58K+oA6CRjGJy2ULg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk61m-00000006sYe-2b6H; Tue, 12 Mar 2024 17:35:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk61T-00000006sKR-1sGy for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 17:34:48 +0000 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 EEE1815BF; Tue, 12 Mar 2024 10:35:18 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B3A223F762; Tue, 12 Mar 2024 10:34:39 -0700 (PDT) From: Robin Murphy To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Will Deacon Cc: Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-perf-users@vger.kernel.org, jialong.yang@shingroup.cn Subject: [PATCH 07/10] perf: Define common uncore capabilities Date: Tue, 12 Mar 2024 17:34:09 +0000 Message-Id: <8496411b6ae9306b70cb90edafa4134b113a3cfe.1710257512.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240312_103443_669581_09AE5C44 X-CRM114-Status: UNSURE ( 9.11 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Nearly all uncore/system PMUs share a common set of capbilities, so let's wrap those up in a single macro for ease of use. Signed-off-by: Robin Murphy --- include/linux/perf_event.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index b1fd832ed8bf..5d5db122005b 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -293,6 +293,9 @@ struct perf_event_pmu_context; #define PERF_PMU_CAP_EXTENDED_HW_TYPE 0x0100 #define PERF_PMU_CAP_NO_COMMON_EVENTS 0x0200 +#define PERF_PMU_UNCORE_CAPS \ +(PERF_PMU_CAP_NO_SAMPLING| PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_COMMON_EVENTS) + struct perf_output_handle; #define PMU_NULL_DEV ((void *)(~0UL))