diff options
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm-cci.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c index bfd03e023308..8f8606b9bc9e 100644 --- a/drivers/perf/arm-cci.c +++ b/drivers/perf/arm-cci.c | |||
@@ -1684,21 +1684,24 @@ static int cci_pmu_probe(struct platform_device *pdev) | |||
1684 | raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock); | 1684 | raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock); |
1685 | mutex_init(&cci_pmu->reserve_mutex); | 1685 | mutex_init(&cci_pmu->reserve_mutex); |
1686 | atomic_set(&cci_pmu->active_events, 0); | 1686 | atomic_set(&cci_pmu->active_events, 0); |
1687 | cci_pmu->cpu = get_cpu(); | ||
1688 | |||
1689 | ret = cci_pmu_init(cci_pmu, pdev); | ||
1690 | if (ret) { | ||
1691 | put_cpu(); | ||
1692 | return ret; | ||
1693 | } | ||
1694 | 1687 | ||
1688 | cci_pmu->cpu = raw_smp_processor_id(); | ||
1689 | g_cci_pmu = cci_pmu; | ||
1695 | cpuhp_setup_state_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE, | 1690 | cpuhp_setup_state_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE, |
1696 | "perf/arm/cci:online", NULL, | 1691 | "perf/arm/cci:online", NULL, |
1697 | cci_pmu_offline_cpu); | 1692 | cci_pmu_offline_cpu); |
1698 | put_cpu(); | 1693 | |
1699 | g_cci_pmu = cci_pmu; | 1694 | ret = cci_pmu_init(cci_pmu, pdev); |
1695 | if (ret) | ||
1696 | goto error_pmu_init; | ||
1697 | |||
1700 | pr_info("ARM %s PMU driver probed", cci_pmu->model->name); | 1698 | pr_info("ARM %s PMU driver probed", cci_pmu->model->name); |
1701 | return 0; | 1699 | return 0; |
1700 | |||
1701 | error_pmu_init: | ||
1702 | cpuhp_remove_state(CPUHP_AP_PERF_ARM_CCI_ONLINE); | ||
1703 | g_cci_pmu = NULL; | ||
1704 | return ret; | ||
1702 | } | 1705 | } |
1703 | 1706 | ||
1704 | static int cci_pmu_remove(struct platform_device *pdev) | 1707 | static int cci_pmu_remove(struct platform_device *pdev) |