mirror of https://github.com/torvalds/linux.git
soc/fsl/qbman: Disable interrupts during portal recovery
Disable the QBMan interrupts during recovery. Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
This commit is contained in:
parent
627da8bad5
commit
ea2b8488ba
|
|
@ -1070,6 +1070,20 @@ int qman_wq_alloc(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void qman_enable_irqs(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < num_possible_cpus(); i++) {
|
||||||
|
if (affine_portals[i]) {
|
||||||
|
qm_out(&affine_portals[i]->p, QM_REG_ISR, 0xffffffff);
|
||||||
|
qm_out(&affine_portals[i]->p, QM_REG_IIR, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is what everything can wait on, even if it migrates to a different cpu
|
* This is what everything can wait on, even if it migrates to a different cpu
|
||||||
* to the one whose affine portal it is waiting on.
|
* to the one whose affine portal it is waiting on.
|
||||||
|
|
@ -1269,8 +1283,8 @@ static int qman_create_portal(struct qman_portal *portal,
|
||||||
qm_out(p, QM_REG_ISDR, isdr);
|
qm_out(p, QM_REG_ISDR, isdr);
|
||||||
portal->irq_sources = 0;
|
portal->irq_sources = 0;
|
||||||
qm_out(p, QM_REG_IER, 0);
|
qm_out(p, QM_REG_IER, 0);
|
||||||
qm_out(p, QM_REG_ISR, 0xffffffff);
|
|
||||||
snprintf(portal->irqname, MAX_IRQNAME, IRQNAME, c->cpu);
|
snprintf(portal->irqname, MAX_IRQNAME, IRQNAME, c->cpu);
|
||||||
|
qm_out(p, QM_REG_IIR, 1);
|
||||||
if (request_irq(c->irq, portal_isr, 0, portal->irqname, portal)) {
|
if (request_irq(c->irq, portal_isr, 0, portal->irqname, portal)) {
|
||||||
dev_err(c->dev, "request_irq() failed\n");
|
dev_err(c->dev, "request_irq() failed\n");
|
||||||
goto fail_irq;
|
goto fail_irq;
|
||||||
|
|
@ -1290,7 +1304,7 @@ static int qman_create_portal(struct qman_portal *portal,
|
||||||
isdr &= ~(QM_PIRQ_DQRI | QM_PIRQ_MRI);
|
isdr &= ~(QM_PIRQ_DQRI | QM_PIRQ_MRI);
|
||||||
qm_out(p, QM_REG_ISDR, isdr);
|
qm_out(p, QM_REG_ISDR, isdr);
|
||||||
if (qm_dqrr_current(p)) {
|
if (qm_dqrr_current(p)) {
|
||||||
dev_err(c->dev, "DQRR unclean\n");
|
dev_dbg(c->dev, "DQRR unclean\n");
|
||||||
qm_dqrr_cdc_consume_n(p, 0xffff);
|
qm_dqrr_cdc_consume_n(p, 0xffff);
|
||||||
}
|
}
|
||||||
if (qm_mr_current(p) && drain_mr_fqrni(p)) {
|
if (qm_mr_current(p) && drain_mr_fqrni(p)) {
|
||||||
|
|
@ -1303,8 +1317,10 @@ static int qman_create_portal(struct qman_portal *portal,
|
||||||
}
|
}
|
||||||
/* Success */
|
/* Success */
|
||||||
portal->config = c;
|
portal->config = c;
|
||||||
|
qm_out(p, QM_REG_ISR, 0xffffffff);
|
||||||
qm_out(p, QM_REG_ISDR, 0);
|
qm_out(p, QM_REG_ISDR, 0);
|
||||||
qm_out(p, QM_REG_IIR, 0);
|
if (!qman_requires_cleanup())
|
||||||
|
qm_out(p, QM_REG_IIR, 0);
|
||||||
/* Write a sane SDQCR */
|
/* Write a sane SDQCR */
|
||||||
qm_dqrr_sdqcr_set(p, portal->sdqcr);
|
qm_dqrr_sdqcr_set(p, portal->sdqcr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -744,6 +744,7 @@ int qman_requires_cleanup(void)
|
||||||
|
|
||||||
void qman_done_cleanup(void)
|
void qman_done_cleanup(void)
|
||||||
{
|
{
|
||||||
|
qman_enable_irqs();
|
||||||
__qman_requires_cleanup = 0;
|
__qman_requires_cleanup = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -279,3 +279,4 @@ int qman_shutdown_fq(u32 fqid);
|
||||||
|
|
||||||
int qman_requires_cleanup(void);
|
int qman_requires_cleanup(void);
|
||||||
void qman_done_cleanup(void);
|
void qman_done_cleanup(void);
|
||||||
|
void qman_enable_irqs(void);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue