“dff04bceefdf1ceee612e46cba801f4d1ba93992”上不存在“README.md”
提交 3cf7ee98 编写于 作者: M Mark Rutland 提交者: Will Deacon

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: NMark Rutland <mark.rutland@arm.com>
Tested-by: NJeremy Linton <jeremy.linton@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 0e2663d9
...@@ -758,10 +758,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu) ...@@ -758,10 +758,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu)
{ {
int err; int err;
err = armpmu_request_irqs(cpu_pmu);
if (err)
goto out;
err = cpuhp_state_add_instance(CPUHP_AP_PERF_ARM_STARTING, err = cpuhp_state_add_instance(CPUHP_AP_PERF_ARM_STARTING,
&cpu_pmu->node); &cpu_pmu->node);
if (err) if (err)
...@@ -777,7 +773,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu) ...@@ -777,7 +773,6 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu)
cpuhp_state_remove_instance_nocalls(CPUHP_AP_PERF_ARM_STARTING, cpuhp_state_remove_instance_nocalls(CPUHP_AP_PERF_ARM_STARTING,
&cpu_pmu->node); &cpu_pmu->node);
out: out:
armpmu_free_irqs(cpu_pmu);
return err; return err;
} }
...@@ -1073,12 +1068,18 @@ int arm_pmu_device_probe(struct platform_device *pdev, ...@@ -1073,12 +1068,18 @@ int arm_pmu_device_probe(struct platform_device *pdev,
goto out_free; goto out_free;
} }
ret = armpmu_request_irqs(pmu);
if (ret)
goto out_free_irqs;
ret = armpmu_register(pmu); ret = armpmu_register(pmu);
if (ret) if (ret)
goto out_free; goto out_free;
return 0; return 0;
out_free_irqs:
armpmu_free_irqs(pmu);
out_free: out_free:
pr_info("%s: failed to register PMU devices!\n", pr_info("%s: failed to register PMU devices!\n",
of_node_full_name(node)); of_node_full_name(node));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部