From: Alastair D'Silva <alast...@d-silva.org> In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggered until the card is reset.
Changelog: v2 Rebase against linux-next Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- drivers/misc/cxl/native.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c index 194c58e..95a776a 100644 --- a/drivers/misc/cxl/native.c +++ b/drivers/misc/cxl/native.c @@ -1205,7 +1205,7 @@ static irqreturn_t native_slice_irq_err(int irq, void *data) { struct cxl_afu *afu = data; u64 errstat, serr, afu_error, dsisr; - u64 fir_slice, afu_debug; + u64 fir_slice, afu_debug, irq_mask; /* * slice err interrupt is only used with full PSL (no XSL) @@ -1226,6 +1226,10 @@ static irqreturn_t native_slice_irq_err(int irq, void *data) dev_crit(&afu->dev, "AFU_ERR_An: 0x%.16llx\n", afu_error); dev_crit(&afu->dev, "PSL_DSISR_An: 0x%.16llx\n", dsisr); + /* mask off the IRQ so it won't retrigger until the card is reset */ + irq_mask = (serr & 0xff80000000000000ULL) >> 32; + serr |= irq_mask; + cxl_p1n_write(afu, CXL_PSL_SERR_An, serr); return IRQ_HANDLED; -- 2.9.3