]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
coresight: trbe: Convert to the new interrupt affinity retrieval API
authorMarc Zyngier <maz@kernel.org>
Mon, 20 Oct 2025 12:29:24 +0000 (13:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 27 Oct 2025 16:16:33 +0000 (17:16 +0100)
Now that the relevant interrupt controllers are equipped with a callback
returning the affinity of per-CPU interrupts, switch the TRBE driver over
to this new method.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://patch.msgid.link/20251020122944.3074811-8-maz@kernel.org
drivers/hwtracing/coresight/coresight-trbe.c

index 43643d2c5bdd0ac432f976dbe666ff0f494033ee..8f17160fec4425711f5e3bdc9227b8a36cfe6fd9 100644 (file)
@@ -1474,9 +1474,10 @@ static void arm_trbe_remove_cpuhp(struct trbe_drvdata *drvdata)
 static int arm_trbe_probe_irq(struct platform_device *pdev,
                              struct trbe_drvdata *drvdata)
 {
+       const struct cpumask *affinity;
        int ret;
 
-       drvdata->irq = platform_get_irq(pdev, 0);
+       drvdata->irq = platform_get_irq_affinity(pdev, 0, &affinity);
        if (drvdata->irq < 0) {
                pr_err("IRQ not found for the platform device\n");
                return drvdata->irq;
@@ -1487,8 +1488,7 @@ static int arm_trbe_probe_irq(struct platform_device *pdev,
                return -EINVAL;
        }
 
-       if (irq_get_percpu_devid_partition(drvdata->irq, &drvdata->supported_cpus))
-               return -EINVAL;
+       cpumask_copy(&drvdata->supported_cpus, affinity);
 
        drvdata->handle = alloc_percpu(struct perf_output_handle *);
        if (!drvdata->handle)