mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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>
This commit is contained in:
@@ -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)
|
static irqreturn_t pmu_handle_irq(int irq_num, void *dev)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
struct cci_pmu *cci_pmu = dev;
|
struct cci_pmu *cci_pmu = dev;
|
||||||
struct cci_pmu_hw_events *events = &cci_pmu->hw_events;
|
struct cci_pmu_hw_events *events = &cci_pmu->hw_events;
|
||||||
int idx, handled = IRQ_NONE;
|
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 */
|
/* Disable the PMU while we walk through the counters */
|
||||||
__cci_pmu_disable(cci_pmu);
|
__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 */
|
/* Enable the PMU and sync possibly overflowed counters */
|
||||||
__cci_pmu_enable_sync(cci_pmu);
|
__cci_pmu_enable_sync(cci_pmu);
|
||||||
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
|
raw_spin_unlock(&events->pmu_lock);
|
||||||
|
|
||||||
return IRQ_RETVAL(handled);
|
return IRQ_RETVAL(handled);
|
||||||
}
|
}
|
||||||
|
@@ -1234,10 +1234,9 @@ static irqreturn_t xgene_pmu_isr(int irq, void *dev_id)
|
|||||||
u32 intr_mcu, intr_mcb, intr_l3c, intr_iob;
|
u32 intr_mcu, intr_mcb, intr_l3c, intr_iob;
|
||||||
struct xgene_pmu_dev_ctx *ctx;
|
struct xgene_pmu_dev_ctx *ctx;
|
||||||
struct xgene_pmu *xgene_pmu = dev_id;
|
struct xgene_pmu *xgene_pmu = dev_id;
|
||||||
unsigned long flags;
|
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&xgene_pmu->lock, flags);
|
raw_spin_lock(&xgene_pmu->lock);
|
||||||
|
|
||||||
/* Get Interrupt PMU source */
|
/* Get Interrupt PMU source */
|
||||||
val = readl(xgene_pmu->pcppmu_csr + PCPPMU_INTSTATUS_REG);
|
val = readl(xgene_pmu->pcppmu_csr + PCPPMU_INTSTATUS_REG);
|
||||||
@@ -1273,7 +1272,7 @@ static irqreturn_t xgene_pmu_isr(int irq, void *dev_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_spin_unlock_irqrestore(&xgene_pmu->lock, flags);
|
raw_spin_unlock(&xgene_pmu->lock);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user