diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-12-05 23:42:59 +1100 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-03-10 14:09:21 +0530 |
commit | 42d9d2ba5bddec06d5bb2e24909269610e62e661 (patch) | |
tree | 3e95002343fd048e9709044c52decefdffadb467 /hw | |
parent | e22ac41da61a536fd5cc4e988eda0cbabed0fb8a (diff) | |
download | skiboot-42d9d2ba5bddec06d5bb2e24909269610e62e661.zip skiboot-42d9d2ba5bddec06d5bb2e24909269610e62e661.tar.gz skiboot-42d9d2ba5bddec06d5bb2e24909269610e62e661.tar.bz2 |
xscom: Don't log xscom errors caused by OPAL calls
[ Upstream commit 80fd2e963bd4364ee8c3b5a06215d8cbdfe04fcb ]
The XSCOM read/write OPAL calls are largely there to support running
PRD in the OS. PRD itself handles submitting error logs (if needed)
when a XSCOM operation fails so there's no need to send an error log
from inside of OPAL.
Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xscom.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -272,10 +272,17 @@ static int64_t xscom_handle_error(uint64_t hmer, uint32_t gcid, uint32_t pcb_add break; } - /* XXX: Create error log entry ? */ - log_simple_error(&e_info(OPAL_RC_XSCOM_RW), - "XSCOM: %s error gcid=0x%x pcb_addr=0x%x stat=0x%x\n", - is_write ? "write" : "read", gcid, pcb_addr, stat); + /* + * If we're in an XSCOM opal call then squash the error + * we assume that the caller (probably opal-prd) will + * handle logging it + */ + if (this_cpu()->current_token != OPAL_XSCOM_READ && + this_cpu()->current_token != OPAL_XSCOM_WRITE) { + log_simple_error(&e_info(OPAL_RC_XSCOM_RW), + "XSCOM: %s error gcid=0x%x pcb_addr=0x%x stat=0x%x\n", + is_write ? "write" : "read", gcid, pcb_addr, stat); + } /* We need to reset the XSCOM or we'll hang on the next access */ xscom_reset(gcid, false); |