mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
23d422a4f1
There are cases when the interrupt status register (JRINTR) is non-zero, even though: 1. An interrupt was generated, but it was masked OR 2. There was no interrupt generated at all for the corresponding job ring. 1. The case when interrupt is masked (JRCFGR_LS[IMSK]=1b'1) while other events have happened and are being accounted for, e.g. -JRINTR[HALT]=2b'10 - input job ring underwent a flush of all on-going jobs and processing of still-existing jobs (sitting in the ring) has been halted -JRINTR[HALT]=2b'01 - input job ring is currently undergoing a flush -JRINTR[ENTER_FAIL]=1b'1 - SecMon / SNVS transitioned to FAIL MODE It doesn't matter whether these events would assert the interrupt signal or not, interrupt is anyhow masked. 2. The case when interrupt is not masked (JRCFGR_LS[IMSK]=1b'0), however the events accounted for in JRINTR do not generate interrupts, e.g.: -JRINTR[HALT]=2b'01 -JRINTR[ENTER_FAIL]=1b'1 and JRCFGR_MS[FAIL_MODE]=1b'0 Currently in these cases, when the JR interrupt handler is invoked (as a consequence of JR sharing the interrupt line with other devices - e.g. the two JRs on i.MX7ULP) it continues execution instead of returning IRQ_NONE. This could lead to situations like interrupt handler clearing JRINTR (and thus also the JRINTR[HALT] field) while corresponding job ring is suspended and then that job ring failing on resume path, due to expecting JRINTR[HALT]=b'10 and reading instead JRINTR[HALT]=b'00. Fix this by checking status of JRINTR[JRI] in the JR interrupt handler. If JRINTR[JRI]=1b'0, there was no interrupt generated for this JR and handler must return IRQ_NONE. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
blob_gen.c | ||
caamalg_desc.c | ||
caamalg_desc.h | ||
caamalg_qi2.c | ||
caamalg_qi2.h | ||
caamalg_qi.c | ||
caamalg.c | ||
caamhash_desc.c | ||
caamhash_desc.h | ||
caamhash.c | ||
caampkc.c | ||
caampkc.h | ||
caamprng.c | ||
caamrng.c | ||
compat.h | ||
ctrl.c | ||
ctrl.h | ||
debugfs.c | ||
debugfs.h | ||
desc_constr.h | ||
desc.h | ||
dpseci_cmd.h | ||
dpseci-debugfs.c | ||
dpseci-debugfs.h | ||
dpseci.c | ||
dpseci.h | ||
error.c | ||
error.h | ||
intern.h | ||
jr.c | ||
jr.h | ||
Kconfig | ||
key_gen.c | ||
key_gen.h | ||
Makefile | ||
pdb.h | ||
pkc_desc.c | ||
qi.c | ||
qi.h | ||
regs.h | ||
sg_sw_qm2.h | ||
sg_sw_qm.h | ||
sg_sw_sec4.h |