diff options
author | Frederic Barrat <fbarrat@linux.ibm.com> | 2019-04-05 16:33:00 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-04-09 10:50:55 +1000 |
commit | fa97373f3274de5239124db5c4039a7517d9344c (patch) | |
tree | fc3cd761b3e1ccf61b06b177009673c8d00e8818 /hw/npu2-common.c | |
parent | d3af5072cb55c5586e7c393596940346c36488c3 (diff) | |
download | skiboot-fa97373f3274de5239124db5c4039a7517d9344c.zip skiboot-fa97373f3274de5239124db5c4039a7517d9344c.tar.gz skiboot-fa97373f3274de5239124db5c4039a7517d9344c.tar.bz2 |
hw/npu2: Use NVLink irq setup for OpenCAPI
Start using the irq setup code from NVLink for OpenCAPI, since the 2
versions are so close. There are only 2 differences:
- the NPU may trigger more interrupts for OpenCAPI, 35 vs. 23, though
none are configured to be triggered for now.
- we need to enable the 4 translation faults interrupts for OpenCAPI.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/npu2-common.c')
-rw-r--r-- | hw/npu2-common.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/hw/npu2-common.c b/hw/npu2-common.c index b0d55f5..0b46f68 100644 --- a/hw/npu2-common.c +++ b/hw/npu2-common.c @@ -26,7 +26,7 @@ #include <xive.h> #define NPU2_IRQ_BASE_SHIFT 13 -#define NPU2_N_DL_IRQS 23 +#define NPU2_N_DL_IRQS 35 #define NPU2_N_DL_IRQS_ALIGN 64 /* @@ -145,6 +145,18 @@ static char *npu2_ipi_name(struct irq_source *is, uint32_t isn) case 20: name = "CQ Event"; break; case 21: name = "MISC Event"; break; case 22: name = "NMMU Local Xstop"; break; + case 23: name = "Translate Fail (brick 2)"; break; + case 24: name = "Translate Fail (brick 3)"; break; + case 25: name = "Translate Fail (brick 4)"; break; + case 26: name = "Translate Fail (brick 5)"; break; + case 27: name = "OTL Event (brick 2)"; break; + case 28: name = "OTL Event (brick 3)"; break; + case 29: name = "OTL Event (brick 4)"; break; + case 30: name = "OTL Event (brick 5)"; break; + case 31: name = "XSL Event (brick 2)"; break; + case 32: name = "XSL Event (brick 3)"; break; + case 33: name = "XSL Event (brick 4)"; break; + case 34: name = "XSL Event (brick 5)"; break; default: name = "Unknown"; } return strdup(name); @@ -177,7 +189,7 @@ static void setup_irqs(struct npu2 *p) p->base_lsi = xive_alloc_ipi_irqs(p->chip_id, NPU2_N_DL_IRQS, NPU2_N_DL_IRQS_ALIGN); if (p->base_lsi == XIVE_IRQ_ERROR) { - prlog(PR_ERR, "NPU: Failed to allocate interrupt sources, IRQs for NDL No-stall events will not be available.\n"); + prlog(PR_ERR, "NPU: Failed to allocate interrupt sources\n"); return; } xive_register_ipi_source(p->base_lsi, NPU2_N_DL_IRQS, p, &npu2_ipi_ops); @@ -375,8 +387,7 @@ static void setup_devices(struct npu2 *npu) return; } - if (nvlink_detected) - setup_irqs(npu); + setup_irqs(npu); if (nvlink_detected) npu2_nvlink_init_npu(npu); |