[Skiboot] [PATCH v2] xscom: Do not print error message for 'chiplet offline' return values

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Thu Oct 5 22:09:26 AEDT 2017


xscom_read/write operations returns CHIPLET_OFFLINE when chiplet is offline.
Some multicast xscom_read/write requests from HBRT results in xscom operation
on offline chiplet(s) and printing below warnings in OPAL console.

[ 135.036327572,3] XSCOM: Read failed, ret = -14
[ 135.092689829,3] XSCOM: Read failed, ret = -14

This results in unnecessary bugs. Hence remove error message for multicast
SCOM operations.

Suggested-by: Daniel M Crowell <dcrowell at us.ibm.com>
Tested-by: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/xscom.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/hw/xscom.c b/hw/xscom.c
index 7bd78bf..716cb73 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -238,6 +238,12 @@ static bool xscom_gcid_ok(uint32_t gcid)
 	return get_chip(gcid) != NULL;
 }
 
+/* Determine if SCOM address is multicast */
+static inline bool xscom_is_multicast_addr(uint32_t addr)
+{
+	return (((addr >> 30) & 0x1) == 0x1);
+}
+
 /*
  * Low level XSCOM access functions, perform a single direct xscom
  * access via MMIO
@@ -274,6 +280,10 @@ static int __xscom_read(uint32_t gcid, uint32_t pcb_addr, uint64_t *val)
 			break;
 	}
 
+	/* Do not print error message for multicast SCOMS */
+	if (xscom_is_multicast_addr(pcb_addr) && ret == OPAL_XSCOM_CHIPLET_OFF)
+		return ret;
+
 	prerror("XSCOM: Read failed, ret =  %lld\n", ret);
 	return ret;
 }
@@ -310,6 +320,10 @@ static int __xscom_write(uint32_t gcid, uint32_t pcb_addr, uint64_t val)
 			break;
 	}
 
+	/* Do not print error message for multicast SCOMS */
+	if (xscom_is_multicast_addr(pcb_addr) && ret == OPAL_XSCOM_CHIPLET_OFF)
+		return ret;
+
 	prerror("XSCOM: Write failed, ret =  %lld\n", ret);
 	return ret;
 }
-- 
2.9.3



More information about the Skiboot mailing list