[Skiboot] [PATCH 3/3] xscom: Don't create PELs for non-severe read/write failures

Gautham R. Shenoy ego at linux.vnet.ibm.com
Thu Dec 5 00:26:30 AEDT 2019

From: "Gautham R. Shenoy" <ego at linux.vnet.ibm.com>

Certain xscom read/write calls initiated by the userspace (either via
HBRT or xscom-utils) can fail with an incorrect-address error code due
to known hardware errors. These failures are not severe, in that they
do not cause the machine to checkstop and hence, elogs need not be
created for them.

This patch defines new function calls named opal_xscom_read() and
opal_xscom_write() to map to OPAL_XSCOM_READ and OPAL_XSCOM_WRITE
calls respectively, so that we can distinguish these calls from the
calls to perform xscom-read/writes initiated within OPAL.

Further, the patch ensures that we do not create PELs for
opal_xscom_read()/write() failures due to incorrect address.

Signed-off-by: Gautham R. Shenoy <ego at linux.vnet.ibm.com>
 hw/xscom.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/hw/xscom.c b/hw/xscom.c
index e8cdabc..6da0d8c 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -659,7 +659,11 @@ int _xscom_read(uint32_t partid, uint64_t pcb_addr, uint64_t *val, bool take_loc
 	return rc;
-opal_call(OPAL_XSCOM_READ, xscom_read, 3);
+static int opal_xscom_read(uint32_t partid, uint64_t pcb_addr, uint64_t *val)
+	return _xscom_read(partid, pcb_addr, val, true, false);
+opal_call(OPAL_XSCOM_READ, opal_xscom_read, 3);
 int _xscom_write(uint32_t partid, uint64_t pcb_addr, uint64_t val, bool take_lock,
 		 bool create_addr_elog)
@@ -708,7 +712,12 @@ int _xscom_write(uint32_t partid, uint64_t pcb_addr, uint64_t val, bool take_loc
 	return rc;
-opal_call(OPAL_XSCOM_WRITE, xscom_write, 3);
+static int opal_xscom_write(uint32_t partid, uint64_t pcb_addr, uint64_t val)
+	return _xscom_write(partid, pcb_addr, val, true, false);
+opal_call(OPAL_XSCOM_WRITE, opal_xscom_write, 3);
  * Perform a xscom read-modify-write.

More information about the Skiboot mailing list