mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
soc: fsl: qbman: avoid race in clearing QMan interrupt
[ Upstream commit 89857a8a5c
]
By clearing all interrupt sources, not only those that
already occurred, the existing code may acknowledge by
mistake interrupts that occurred after the code checks
for them.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
37b6ac5254
commit
d31765ea42
1 changed files with 5 additions and 4 deletions
|
@ -1073,18 +1073,19 @@ static void qm_mr_process_task(struct work_struct *work);
|
|||
static irqreturn_t portal_isr(int irq, void *ptr)
|
||||
{
|
||||
struct qman_portal *p = ptr;
|
||||
|
||||
u32 clear = QM_DQAVAIL_MASK | p->irq_sources;
|
||||
u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources;
|
||||
u32 clear = 0;
|
||||
|
||||
if (unlikely(!is))
|
||||
return IRQ_NONE;
|
||||
|
||||
/* DQRR-handling if it's interrupt-driven */
|
||||
if (is & QM_PIRQ_DQRI)
|
||||
if (is & QM_PIRQ_DQRI) {
|
||||
__poll_portal_fast(p, QMAN_POLL_LIMIT);
|
||||
clear = QM_DQAVAIL_MASK | QM_PIRQ_DQRI;
|
||||
}
|
||||
/* Handling of anything else that's interrupt-driven */
|
||||
clear |= __poll_portal_slow(p, is);
|
||||
clear |= __poll_portal_slow(p, is) & QM_PIRQ_SLOW;
|
||||
qm_out(&p->p, QM_REG_ISR, clear);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue