[Skiboot] [PATCH] hw/npu2: Don't assert if we hit a mixed OpenCAPI/NVLink setup

Andrew Donnellan andrew.donnellan at au1.ibm.com
Mon Aug 6 12:17:42 AEST 2018


If our device tree contains a mix of OpenCAPI and NVLink links, that's a
problem, but it's not fatal and we should simply abort NPU init rather than
kill the machine - this is helpful for doing further debugging.

Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

---

Debating whether or not to send a backport of this to the 6.0 stable
tree...
---
 hw/npu2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/npu2.c b/hw/npu2.c
index acd56c14e1da..5a5e6944c898 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -1362,7 +1362,7 @@ static void npu2_probe_phb(struct dt_node *dn)
 
 	if (ocapi_detected && nvlink_detected) {
 		prlog(PR_ERR, "NPU: NVLink and OpenCAPI devices on same chip not supported\n");
-		assert(false);
+	        return;
 	} else if (ocapi_detected) {
 		prlog(PR_INFO, "NPU: OpenCAPI link configuration detected, not initialising NVLink\n");
 		return;
-- 
2.11.0



More information about the Skiboot mailing list