From mboxrd@z Thu Jan 1 00:00:00 1970 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 9FE6BC54E67 for ; Tue, 12 Mar 2024 17:35:23 +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=53QricsHH/mbvD11o/iu8bW6MdsWpTf6oUUpUeJV8yk=; b=K9AQvfSwq7545D ddoS6B4d9WJB5aQxlaSnIJZWVQt9e803waPMCWQHBuzGjlm/qZPoJuqw/mrCS+sQlC63QcjZdz/p2 8xidLoSfdKWUYwIT0uWa8sSccGJvYU94lxIBCzYPyQvPl/Jgj+0VHdlGkRA9P3r2wfseGb9pWpwzR x/tb0MEHrjiSipD3IETpMhDCbosgZ0Uzuoi5+ZbTjrZwRskp7WnbNo4s0ZUnIQ6QBjTEx6i4wnlxb Xq14oJBFD4PowNrT19jMoh9jUbqNSvDHj2LlN8gViwJyHasXDEqOzZruRP2+6SZdxqjVme/k3jKgV XbY+11M2OTwt6Fp2EZQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk61o-00000006saP-42Sg; Tue, 12 Mar 2024 17:35:05 +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 1rk61a-00000006sF7-01VF for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 17:34:54 +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 DB0D615BF; Tue, 12 Mar 2024 10:35:26 -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 4EB4D3F762; Tue, 12 Mar 2024 10:34:47 -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, Russell King , Shawn Guo , Sascha Hauer Subject: [PATCH 10/10] ARM: Use common uncore PMU capabilities Date: Tue, 12 Mar 2024 17:34:12 +0000 Message-Id: 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_103450_360899_0F49C08A X-CRM114-Status: GOOD ( 12.68 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Switch the ARM system PMU drivers over to the new common capabilities, allowing to remove all the checks that perf core now takes care of. CC: Russell King CC: Shawn Guo CC: Sascha Hauer Signed-off-by: Robin Murphy --- arch/arm/mach-imx/mmdc.c | 16 +--------------- arch/arm/mm/cache-l2x0-pmu.c | 12 +----------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 444a7eaa320c..806ab6675b37 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -280,20 +280,6 @@ static int mmdc_pmu_event_init(struct perf_event *event) struct mmdc_pmu *pmu_mmdc = to_mmdc_pmu(event->pmu); int cfg = event->attr.config; - if (event->attr.type != event->pmu->type) - return -ENOENT; - - if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) - return -EOPNOTSUPP; - - if (event->cpu < 0) { - dev_warn(pmu_mmdc->dev, "Can't provide per-task data!\n"); - return -EOPNOTSUPP; - } - - if (event->attr.sample_period) - return -EINVAL; - if (cfg < 0 || cfg >= MMDC_NUM_COUNTERS) return -EINVAL; @@ -445,7 +431,7 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc, .start = mmdc_pmu_event_start, .stop = mmdc_pmu_event_stop, .read = mmdc_pmu_event_update, - .capabilities = PERF_PMU_CAP_NO_EXCLUDE, + .capabilities = PERF_PMU_UNCORE_CAPS, }, .mmdc_base = mmdc_base, .dev = dev, diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c index 993fefdc167a..a2567d953fdb 100644 --- a/arch/arm/mm/cache-l2x0-pmu.c +++ b/arch/arm/mm/cache-l2x0-pmu.c @@ -295,16 +295,6 @@ static int l2x0_pmu_event_init(struct perf_event *event) { struct hw_perf_event *hw = &event->hw; - if (event->attr.type != l2x0_pmu->type) - return -ENOENT; - - if (is_sampling_event(event) || - event->attach_state & PERF_ATTACH_TASK) - return -EINVAL; - - if (event->cpu < 0) - return -EINVAL; - if (event->attr.config & ~L2X0_EVENT_CNT_CFG_SRC_MASK) return -EINVAL; @@ -524,7 +514,7 @@ static __init int l2x0_pmu_init(void) .del = l2x0_pmu_event_del, .event_init = l2x0_pmu_event_init, .attr_groups = l2x0_pmu_attr_groups, - .capabilities = PERF_PMU_CAP_NO_EXCLUDE, + .capabilities = PERF_PMU_UNCORE_CAPS, }; l2x0_pmu_reset(); -- 2.39.2.101.g768bb238c484.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel