summaryrefslogtreecommitdiff
path: root/drivers/perf/arm-cci.c
diff options
context:
space:
mode:
authorQi Liu <liuqi115@huawei.com>2021-02-09 17:42:22 +0800
committerWill Deacon <will@kernel.org>2021-02-10 18:50:42 +0000
commit8ee37e0f97ec66b953d202257293670efaab1daa (patch)
tree7097f3cf73a2b917254daa899e19a325d2551245 /drivers/perf/arm-cci.c
parent750d43b4a79e5f3767ee1db933b42abdf967ce1e (diff)
drivers/perf: Replace spin_lock_irqsave to spin_lock
There is no need to do spin_lock_irqsave in context of hard IRQ, so replace them with spin_lock. Signed-off-by: Qi Liu <liuqi115@huawei.com> Link: https://lore.kernel.org/r/1612863742-1551-1-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/arm-cci.c')
-rw-r--r--drivers/perf/arm-cci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c
index a75cf77c4de4..f81e2ec90005 100644
--- a/drivers/perf/arm-cci.c
+++ b/drivers/perf/arm-cci.c
@@ -1026,12 +1026,11 @@ static void pmu_event_set_period(struct perf_event *event)
static irqreturn_t pmu_handle_irq(int irq_num, void *dev)
{
- unsigned long flags;
struct cci_pmu *cci_pmu = dev;
struct cci_pmu_hw_events *events = &cci_pmu->hw_events;
int idx, handled = IRQ_NONE;
- raw_spin_lock_irqsave(&events->pmu_lock, flags);
+ raw_spin_lock(&events->pmu_lock);
/* Disable the PMU while we walk through the counters */
__cci_pmu_disable(cci_pmu);
@@ -1061,7 +1060,7 @@ static irqreturn_t pmu_handle_irq(int irq_num, void *dev)
/* Enable the PMU and sync possibly overflowed counters */
__cci_pmu_enable_sync(cci_pmu);
- raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
+ raw_spin_unlock(&events->pmu_lock);
return IRQ_RETVAL(handled);
}