From: Shawn Guo <shawnguo2@yeah.net>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
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 <linux@armlinux.org.uk>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 10/10] ARM: Use common uncore PMU capabilities
Date: Sat, 30 Mar 2024 22:59:27 +0800 [thread overview]
Message-ID: <Zggoz46PSlCN5Bt+@dragon> (raw)
In-Reply-To: <de2646ca1d333cd9286f22ed3a5e8d57d22833b1.1710257512.git.robin.murphy@arm.com>
On Tue, Mar 12, 2024 at 05:34:12PM +0000, Robin Murphy wrote:
> 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 <linux@armlinux.org.uk>
> CC: Shawn Guo <shawnguo@kernel.org>
> CC: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> arch/arm/mach-imx/mmdc.c | 16 +---------------
Acked-by: Shawn Guo <shawnguo@kernel.org>
> 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
>
next prev parent reply other threads:[~2024-03-30 15:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 17:34 [PATCH 00/10] perf: Clean up common uncore boilerplate Robin Murphy
2024-03-12 17:34 ` [PATCH 01/10] perf/alibaba_uncore_drw: Use correct CPU affinity Robin Murphy
2024-03-12 17:34 ` [PATCH 02/10] perf: Add capability for common event support Robin Murphy
2024-03-14 8:09 ` Yang Jialong 杨佳龙
2024-03-14 12:34 ` Robin Murphy
2024-03-12 17:34 ` [PATCH 03/10] drivers/perf: Use PERF_PMU_CAP_NO_COMMON_EVENTS Robin Murphy
2024-03-12 17:34 ` [PATCH 04/10] perf: Rename PERF_PMU_CAP_NO_INTERRUPT Robin Murphy
2024-03-13 12:05 ` kernel test robot
2024-03-13 15:44 ` kernel test robot
2024-03-12 17:34 ` [PATCH 05/10] drivers/perf: Use PERF_PMU_CAP_NO_SAMPLING consistently Robin Murphy
2024-03-13 11:11 ` James Clark
2024-03-13 12:02 ` Robin Murphy
2024-03-12 17:34 ` [PATCH 06/10] drivers/perf: Clean up redundant per-task checks Robin Murphy
2024-03-12 17:34 ` [PATCH 07/10] perf: Define common uncore capabilities Robin Murphy
2024-03-13 11:23 ` James Clark
2024-03-13 12:24 ` Robin Murphy
2024-03-12 17:34 ` [PATCH 08/10] drivers/perf: Use " Robin Murphy
2024-03-12 17:34 ` [PATCH 09/10] x86: Use common uncore PMU capabilities Robin Murphy
2024-03-12 17:34 ` [PATCH 10/10] ARM: " Robin Murphy
2024-03-30 14:59 ` Shawn Guo [this message]
2024-03-13 11:26 ` [PATCH 00/10] perf: Clean up common uncore boilerplate James Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zggoz46PSlCN5Bt+@dragon \
--to=shawnguo2@yeah.net \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jialong.yang@shingroup.cn \
--cc=jolsa@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=robin.murphy@arm.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).