aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.ibm.com>2019-03-15 17:44:38 +0100
committerStewart Smith <stewart@linux.ibm.com>2019-03-20 14:27:08 +1100
commit8cf6758e1889d8158b7bacaf4f6a7f39e1214d4d (patch)
tree7c27513c7e61f3c16e35520a79693ddf57d3efb3
parentbef1ddc40813976f0f422ade4a5b9374176ca22a (diff)
downloadskiboot-8cf6758e1889d8158b7bacaf4f6a7f39e1214d4d.zip
skiboot-8cf6758e1889d8158b7bacaf4f6a7f39e1214d4d.tar.gz
skiboot-8cf6758e1889d8158b7bacaf4f6a7f39e1214d4d.tar.bz2
npu2-hw-procedures: Don't set iovalid for opencapi devices
set_iovalid() is called on the PHY reset path. The hw logic it touches is meaningless for opencapi. It's not hurting as long as all the links under the NPU are in opencapi mode, but in case of mixing opencapi and nvlink, we'll be in troubles: the code finds which bit to modify based on the brick index, which varies depending on the mode. So calling that function on an opencapi device may modify a nvlink brick! For example, for brick index 3. So we simply avoid doing anything when calling set_iovalid() for an opencapi device. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--hw/npu2-hw-procedures.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/npu2-hw-procedures.c b/hw/npu2-hw-procedures.c
index a10ccb7..3ee646c 100644
--- a/hw/npu2-hw-procedures.c
+++ b/hw/npu2-hw-procedures.c
@@ -218,6 +218,9 @@ static void set_iovalid(struct npu2_dev *ndev, bool raise)
uint64_t addr, val, mask;
int rc;
+ if (ndev->type == NPU2_DEV_TYPE_OPENCAPI)
+ return;
+
addr = (ndev->pl_xscom_base & 0x3F000000) | 0x9;
mask = PPC_BIT(6 + obus_brick_index(ndev));
val = raise ? mask : 0;