public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, pierre.gondois@arm.com,
	valentin.schneider@arm.com, vschneid@redhat.com
Subject: Re: [PATCH 3/3] arm_pmu: rework ACPI probing
Date: Tue, 8 Nov 2022 09:42:28 +0000	[thread overview]
Message-ID: <Y2okhPARqweMbHA8@FVFF77S0Q05N.cambridge.arm.com> (raw)
In-Reply-To: <20221107191017.GA21991@willie-the-truck>

On Mon, Nov 07, 2022 at 07:10:18PM +0000, Will Deacon wrote:
> On Fri, Sep 30, 2022 at 12:18:44PM +0100, Mark Rutland wrote:
> > @@ -320,13 +320,26 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
> >  	 * For the moment, as with the platform/DT case, we need at least one
> >  	 * of a PMU's CPUs to be online at probe time.
> >  	 */
> > -	for_each_possible_cpu(cpu) {
> > +	for_each_online_cpu(cpu) {
> >  		struct arm_pmu *pmu = per_cpu(probed_pmus, cpu);
> > +		unsigned long cpuid;
> >  		char *base_name;
> >  
> > -		if (!pmu || pmu->name)
> > +		/* If we've already probed this CPU, we have nothing to do */
> > +		if (pmu)
> >  			continue;
> >  
> > +		pmu = armpmu_alloc();
> > +		if (!pmu) {
> > +			pr_warn("Unable to allocate PMU for CPU%d\n",
> > +				cpu);
> > +		}
> > +
> > +		cpuid = per_cpu(cpu_data, cpu).reg_midr;
> > +		pmu->acpi_cpuid = cpuid;
> 
> I've queued this, but if armpmu_alloc() fails we now deference NULL here
> whereas we should probably propagate the error.

Whoops; that was meant to return -ENOMEM, as with the other allocation failure.
 
> Please can you send a fix on top of for-next/acpi?

Done:

  https://lore.kernel.org/r/20221108093725.1239563-1-mark.rutland@arm.com

Thanks,
Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-08  9:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 11:18 [PATCH 0/3] arm_pmu: acpi: avoid allocations in atomic context Mark Rutland
2022-09-30 11:18 ` [PATCH 1/3] arm_pmu: acpi: factor out PMU<->CPU association Mark Rutland
2022-09-30 11:18 ` [PATCH 2/3] arm_pmu: factor out PMU matching Mark Rutland
2022-09-30 11:18 ` [PATCH 3/3] arm_pmu: rework ACPI probing Mark Rutland
2022-11-07 19:10   ` Will Deacon
2022-11-08  9:42     ` Mark Rutland [this message]
2022-09-30 14:45 ` [PATCH 0/3] arm_pmu: acpi: avoid allocations in atomic context Pierre Gondois
2022-10-18 13:53 ` Kunkun Jiang
2022-10-18 16:55   ` Mark Rutland
2022-11-07 19:08 ` Will Deacon

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=Y2okhPARqweMbHA8@FVFF77S0Q05N.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=pierre.gondois@arm.com \
    --cc=valentin.schneider@arm.com \
    --cc=vschneid@redhat.com \
    --cc=will@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