Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Myria Sarvay" <myrialsarvay@gmail.com>
Cc: linux-perf-users@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 08/13] drivers/perf: apple_m1: Add Apple A18 Support
Date: Tue, 03 Nov 2026 10:47:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-195068@kernel.org> (raw)
In-Reply-To: <20261103-m3-plus-pmu-events-v1-8-a8eb6c1139fe@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drivers/perf: apple_m1: redundant a18_pmu_* aliases and unused macro
--

commit 96c1a110d959d59196297459a3c8bd2316dfaece
Author: Myria Sarvay <myrialsarvay@gmail.com>

drivers/perf: apple_m1: Add Apple A18 Support

This commit adds CPU PMU support for the Apple A18 (Tahiti) cores by
reusing the M4 PMU event mappings and callbacks.

> diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c
> index bdbd138cf1db8..775f3d5aba7ea 100644
> --- a/drivers/perf/apple_m1_cpu_pmu.c
> +++ b/drivers/perf/apple_m1_cpu_pmu.c
> @@ -1149,12 +1149,23 @@ static int gen ## _pmu_ ## family ## _init(struct arm_pmu *cpu_pmu)				\
>  #define m4_pmu_set_event_filter		m3_pmu_set_event_filter
>  #define m4_pmu_format_attr_group	m3_pmu_format_attr_group
>  
> +#define a18_pmu_enable_event		m4_pmu_enable_event
> +#define a18_pmu_map_event		m4_pmu_map_event
> +#define a18_pmu_get_event_idx		m4_pmu_get_event_idx
> +#define a18_pmu_set_event_filter	m4_pmu_set_event_filter
> +#define a18_pmu_map_pmuv3_event		m4_pmu_map_pmuv3_event
> +#define a18_pmu_init_pmceid		m4_pmu_init_pmceid
> +#define a18_pmu_events_attr_group	m4_pmu_events_attr_group
> +#define a18_pmu_format_attr_group	m4_pmu_format_attr_group
> +
>  APPLE_PMU_INIT(m1, icestorm)
>  APPLE_PMU_INIT(m1, firestorm)
>  APPLE_PMU_INIT(m2, avalanche)
>  APPLE_PMU_INIT(m2, blizzard)
>  APPLE_PMU_INIT(m3, sawtooth)
>  APPLE_PMU_INIT(m3, everest)
> +APPLE_PMU_INIT(a18, tahiti_e)
> +APPLE_PMU_INIT(a18, tahiti_p)

[Severity: Low]
This isn't a bug, but since APPLE_PMU_INIT(gen, family) only uses the gen
argument to select the gen_pmu_* callbacks and attribute groups (while
cpu_pmu->name is constructed solely from family), are the a18_pmu_* alias
macros needed here?

Unlike m2 and m4, which define generation-specific callbacks or attribute
groups and only alias the remaining symbols from an earlier generation, a18
aliases every symbol to m4_pmu_*. In addition, a18_pmu_init_pmceid is never
used by APPLE_PMU_INIT() and expands to m4_pmu_init_pmceid, which does not
exist.

Could this use APPLE_PMU_INIT(m4, tahiti_e) and APPLE_PMU_INIT(m4, tahiti_p)
directly (with m4_pmu_tahiti_e_init and m4_pmu_tahiti_p_init in
m1_pmu_of_device_ids) and drop the a18_pmu_* macro definitions?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-m3-plus-pmu-events-v1-0-a8eb6c1139fe@gmail.com?part=8

  reply	other threads:[~2026-11-03 10:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 10:14 [PATCH 00/13] drivers/perf: apple_m1: Add M3/M4/A18 Pro Support Myria Sarvay via B4 Relay
2026-11-03 10:14 ` [PATCH 01/13] dt-bindings: arm: pmu: Add Apple M3/M4/A18 Pro SoC CPU PMU compatibles Myria Sarvay via B4 Relay
2026-11-03 10:19   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 02/13] drivers/perf: apple_m1: Remove unused variables Myria Sarvay via B4 Relay
2026-11-03 10:21   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 03/13] drivers/perf: apple_m1: Support per-implementation event tables Myria Sarvay via B4 Relay
2026-11-03 10:22   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 04/13] drivers/perf: apple_m1: Support per-implementation event size Myria Sarvay via B4 Relay
2026-11-03 10:25   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 05/13] drivers/perf: apple_m1: Use macros for per-implementation init functions Myria Sarvay via B4 Relay
2026-11-03 10:31   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 06/13] drivers/perf: apple_m1: Add Apple M3 Series Support Myria Sarvay via B4 Relay
2026-11-03 10:37   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 07/13] drivers/perf: apple_m1: Add Apple M4 " Myria Sarvay via B4 Relay
2026-11-03 10:43   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 08/13] drivers/perf: apple_m1: Add Apple A18 Support Myria Sarvay via B4 Relay
2026-11-03 10:47   ` sashiko-bot [this message]
2026-11-03 10:14 ` [PATCH 09/13] arm64: dts: apple: t603x: Add PMU Device Nodes Myria Sarvay via B4 Relay
2026-11-03 10:54   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 10/13] arm64: dts: apple: t8122: " Myria Sarvay via B4 Relay
2026-11-03 11:03   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 11/13] arm64: dts: apple: t604x: " Myria Sarvay via B4 Relay
2026-11-03 11:12   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 12/13] arm64: dts: apple: t8132: " Myria Sarvay via B4 Relay
2026-11-03 11:14   ` sashiko-bot
2026-11-03 10:14 ` [PATCH 13/13] arm64: dts: apple: t8140: " Myria Sarvay via B4 Relay
2026-11-03 11:23   ` sashiko-bot

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=sashiko-outbox-195068@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=myrialsarvay@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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