Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Geetha sowjanya" <gakula@marvell.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-perf-users@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 2/3] perf: marvell: Add CN20K LLC-TAD PMU support
Date: Tue, 16 Jun 2026 07:22:59 +0000	[thread overview]
Message-ID: <20260616072300.0D2381F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260616071149.12523-3-gakula@marvell.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch series reverses the registration order of the PMU and CPU hotplug, creating a race window where the PMU is exposed to userspace before hotplug migration is wired up.
--

commit 71b7ba2b271b1080739c44e37ec7465ecb45ee0e
Author: Geetha sowjanya <gakula@marvell.com>

perf: marvell: Add CN20K LLC-TAD PMU support

Add support for the LLC Tag-and-Data (TAD) PMU present in
Marvell CN20K SoCs.

> diff --git a/drivers/perf/marvell_cn10k_tad_pmu.c b/drivers/perf/marvell_cn10k_tad_pmu.c
> index 69a6648fa6648..cd81bf8ff5690 100644
> --- a/drivers/perf/marvell_cn10k_tad_pmu.c
> +++ b/drivers/perf/marvell_cn10k_tad_pmu.c

[ ... ]

> @@ -478,7 +521,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
>  		.read		= tad_pmu_event_counter_read,
>  	};
>  
> -	if (version == TAD_PMU_V1) {
> +	if (version == TAD_PMU_V1 || version == TAD_PMU_V3) {
>  		tad_pmu->pmu.attr_groups = tad_pmu_attr_groups;
>  		tad_pmu->ops		 = &tad_pmu_ops;
>  	} else {

[Severity: Medium]
Looking at the remainder of tad_pmu_probe(), the registration order is:

	ret = perf_pmu_register(&tad_pmu->pmu, "tad", -1);
	if (ret) {
		dev_err(&pdev->dev, "Error %d registering perf PMU\n", ret);
		return ret;
	}

	ret = cpuhp_state_add_instance_nocalls(tad_pmu_cpuhp_state,
					       &tad_pmu->node);

Does this sequence create a race window where the PMU is exposed to
userspace before hotplug migration is wired up?

If userspace immediately creates events assigned to tad_pmu->cpu, and that
CPU goes offline before the hotplug state instance is added, the hotplug
callback wouldn't be invoked to migrate the context. This could leave the
PMU tied to an offline CPU, preventing its events from being scheduled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260616071149.12523-1-gakula@marvell.com?part=2

  reply	other threads:[~2026-06-16  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  7:11 [PATCH v3 0/3] perf: marvell: LLC-TAD PMU MPAM filtering support Geetha sowjanya
2026-06-16  7:11 ` [PATCH v3 1/3] perf: marvell: Add MPAM partid filtering to CN10K TAD PMU Geetha sowjanya
2026-06-16  7:11 ` [PATCH v3 2/3] perf: marvell: Add CN20K LLC-TAD PMU support Geetha sowjanya
2026-06-16  7:22   ` sashiko-bot [this message]
2026-06-16  7:11 ` [PATCH v3 3/3] dt-bindings: perf: marvell: add CN20K TAD " Geetha sowjanya

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=20260616072300.0D2381F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gakula@marvell.com \
    --cc=linux-perf-users@vger.kernel.org \
    --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