[PATCH 4/4] perf/arm_cspmu: Make IRQ more optional
Ilkka Koskinen
ilkka at os.amperecomputing.com
Sun Jul 12 23:32:24 PDT 2026
On Thu, 9 Jul 2026, Robin Murphy wrote:
> If we have 64-bit counters, we can reasonably assume we'll never have to
> handle an overflow before the end of the universe (since we're a system
> PMU with no sampling). Thus even if firmware does specify an IRQ, we can
> still continue in the event of being unable to request it. This can help
> systems where IRQs cannot be claimed exclusively, or are broken in other
> ways.
>
> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
Looks good to me,
Reviewed-by: Ilkka Koskinen <ilkka at os.amperecomputing.com>
Cheers, Ilkka
> ---
> drivers/perf/arm_cspmu/arm_cspmu.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
> index 0b26a1588eba..4ba47bccc99c 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
> @@ -1257,8 +1257,11 @@ static int arm_cspmu_device_probe(struct platform_device *pdev)
> return ret;
>
> ret = arm_cspmu_request_irq(cspmu);
> - if (ret)
> - return ret;
> + if (ret) {
> + if (counter_size(cspmu) < 64)
> + return ret;
> + dev_info(cspmu->dev, "Continuing without IRQ\n");
> + }
>
> ret = arm_cspmu_get_cpus(cspmu);
> if (ret)
> --
> 2.54.0.dirty
>
>
More information about the linux-arm-kernel
mailing list