]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/misc/cxl/irq.c
Merge tag 'sh-for-4.8' of git://git.libc.org/linux-sh
[karo-tx-linux.git] / drivers / misc / cxl / irq.c
index 8def4553acbaabe0307af131f321fb0d42397e91..dec60f58a7677b8999af2a246613e03a19b0d3bc 100644 (file)
@@ -260,9 +260,6 @@ int afu_allocate_irqs(struct cxl_context *ctx, u32 count)
        else
                alloc_count = count + 1;
 
-       /* Initialize the list head to hold irq names */
-       INIT_LIST_HEAD(&ctx->irq_names);
-
        if ((rc = cxl_ops->alloc_irq_ranges(&ctx->irqs, ctx->afu->adapter,
                                                        alloc_count)))
                return rc;
@@ -374,3 +371,32 @@ void afu_release_irqs(struct cxl_context *ctx, void *cookie)
 
        ctx->irq_count = 0;
 }
+
+void cxl_afu_decode_psl_serr(struct cxl_afu *afu, u64 serr)
+{
+       dev_crit(&afu->dev,
+                "PSL Slice error received. Check AFU for root cause.\n");
+       dev_crit(&afu->dev, "PSL_SERR_An: 0x%016llx\n", serr);
+       if (serr & CXL_PSL_SERR_An_afuto)
+               dev_crit(&afu->dev, "AFU MMIO Timeout\n");
+       if (serr & CXL_PSL_SERR_An_afudis)
+               dev_crit(&afu->dev,
+                        "MMIO targeted Accelerator that was not enabled\n");
+       if (serr & CXL_PSL_SERR_An_afuov)
+               dev_crit(&afu->dev, "AFU CTAG Overflow\n");
+       if (serr & CXL_PSL_SERR_An_badsrc)
+               dev_crit(&afu->dev, "Bad Interrupt Source\n");
+       if (serr & CXL_PSL_SERR_An_badctx)
+               dev_crit(&afu->dev, "Bad Context Handle\n");
+       if (serr & CXL_PSL_SERR_An_llcmdis)
+               dev_crit(&afu->dev, "LLCMD to Disabled AFU\n");
+       if (serr & CXL_PSL_SERR_An_llcmdto)
+               dev_crit(&afu->dev, "LLCMD Timeout to AFU\n");
+       if (serr & CXL_PSL_SERR_An_afupar)
+               dev_crit(&afu->dev, "AFU MMIO Parity Error\n");
+       if (serr & CXL_PSL_SERR_An_afudup)
+               dev_crit(&afu->dev, "AFU MMIO Duplicate CTAG Error\n");
+       if (serr & CXL_PSL_SERR_An_AE)
+               dev_crit(&afu->dev,
+                        "AFU asserted JDONE with JERROR in AFU Directed Mode\n");
+}