Skip to content

Commit 3cf7ee9

Browse files
mrutland-armwildea01
authored andcommitted
drivers/perf: arm_pmu: move irq request/free into probe
Currently we request (and potentially free) all IRQs for a given PMU in cpu_pmu_init(). This works for platform/DT probing today, but it doesn't fit ACPI well as we don't have all our affinity data up-front. In preparation for ACPI support, fold the IRQ request/free into arm_pmu_device_probe(), which will remain specific to platform/DT probing. Signed-off-by: Mark Rutland <[email protected]> Tested-by: Jeremy Linton <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 0e2663d commit 3cf7ee9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/perf/arm_pmu.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu)
758758
{
759759
int err;
760760

761-
err = armpmu_request_irqs(cpu_pmu);
762-
if (err)
763-
goto out;
764-
765761
err = cpuhp_state_add_instance(CPUHP_AP_PERF_ARM_STARTING,
766762
&cpu_pmu->node);
767763
if (err)
@@ -777,7 +773,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu)
777773
cpuhp_state_remove_instance_nocalls(CPUHP_AP_PERF_ARM_STARTING,
778774
&cpu_pmu->node);
779775
out:
780-
armpmu_free_irqs(cpu_pmu);
781776
return err;
782777
}
783778

@@ -1073,12 +1068,18 @@ int arm_pmu_device_probe(struct platform_device *pdev,
10731068
goto out_free;
10741069
}
10751070

1071+
ret = armpmu_request_irqs(pmu);
1072+
if (ret)
1073+
goto out_free_irqs;
1074+
10761075
ret = armpmu_register(pmu);
10771076
if (ret)
10781077
goto out_free;
10791078

10801079
return 0;
10811080

1081+
out_free_irqs:
1082+
armpmu_free_irqs(pmu);
10821083
out_free:
10831084
pr_info("%s: failed to register PMU devices!\n",
10841085
of_node_full_name(node));

0 commit comments

Comments
 (0)