From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com,
ilkka@os.amperecomputing.com, bwicaksono@nvidia.com,
linux-acpi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 3/4] perf/arm_cspmu: Improve sub-module error reporting
Date: Sun, 12 Jul 2026 23:13:47 -0700 (PDT) [thread overview]
Message-ID: <638938a1-63b5-3d65-024d-9e2ede0ecef5@os.amperecomputing.com> (raw)
In-Reply-To: <f8bdaf6c3f0ec2be905e43766410177d3c409690.1783605641.git.robin.murphy@arm.com>
On Thu, 9 Jul 2026, Robin Murphy wrote:
> When waiting for a sub-module to register, we return a bare
> -EPROBE_DEFER that ends up showing the end user:
>
> platform arm-cs-arch-pmu.1: deferred probe pending (no reason)
>
> wherein it's not necessarily clear that they might need to take some
> action to ensure the appropriate module is available to load. Let's use
> dev_err_probe() here so we can show exactly what we're waiting for.
>
> Similarly, in the case where something's gone horribly wrong with an
> already-registered module, we can use dev_WARN() to standardise the
> device/driver attribution rather than just open-coding "arm_cspmu".
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Looks good to me,
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cheers, Ilkka
> ---
> drivers/perf/arm_cspmu/arm_cspmu.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
> index 0570be74d11f..0b26a1588eba 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
> @@ -438,13 +438,15 @@ static int arm_cspmu_init_impl_ops(struct arm_cspmu *cspmu)
> if (ret)
> module_put(match->module);
> } else {
> - WARN(1, "arm_cspmu failed to get module: %s\n",
> + dev_WARN(cspmu->dev, "Failed to get module: %s\n",
> match->module_name);
> ret = -EINVAL;
> }
> } else {
> request_module_nowait(match->module_name);
> - ret = -EPROBE_DEFER;
> + ret = dev_err_probe(cspmu->dev, -EPROBE_DEFER,
> + "Waiting for module %s to load\n",
> + match->module_name);
> }
>
> mutex_unlock(&arm_cspmu_lock);
> --
> 2.54.0.dirty
>
>
next prev parent reply other threads:[~2026-07-13 6:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 14:39 [PATCH 0/4] perf/arm_cspmu: Miscellaneous improvements Robin Murphy
2026-07-09 14:39 ` [PATCH 1/4] ACPI/APMT: Use stable device ID Robin Murphy
2026-07-09 15:31 ` Robin Murphy
2026-07-13 5:46 ` Ilkka Koskinen
2026-07-09 14:39 ` [PATCH 2/4] perf/arm_cspmu: Improve APMT-based PMU naming Robin Murphy
2026-07-09 15:42 ` Robin Murphy
2026-07-09 14:39 ` [PATCH 3/4] perf/arm_cspmu: Improve sub-module error reporting Robin Murphy
2026-07-13 6:13 ` Ilkka Koskinen [this message]
2026-07-09 14:39 ` [PATCH 4/4] perf/arm_cspmu: Make IRQ more optional Robin Murphy
2026-07-13 6:32 ` Ilkka Koskinen
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=638938a1-63b5-3d65-024d-9e2ede0ecef5@os.amperecomputing.com \
--to=ilkka@os.amperecomputing.com \
--cc=bwicaksono@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.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