aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>2020-11-27 12:21:29 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-01-06 16:57:51 +0530
commite17181277dc5be80be5a8f4004b32fb8cd1183e0 (patch)
tree7f970bf7c22fe9384659f73a730d5fb7355abf61
parentbd04a4483ef49eee2831ffbd8871f6870f729b72 (diff)
downloadskiboot-e17181277dc5be80be5a8f4004b32fb8cd1183e0.zip
skiboot-e17181277dc5be80be5a8f4004b32fb8cd1183e0.tar.gz
skiboot-e17181277dc5be80be5a8f4004b32fb8cd1183e0.tar.bz2
xscom: Fix xscom error logging caused due to xscom OPAL call
[ Upstream commit a4101173cacf79fcd91d395ab12aac9cb6840975 ] Commit 80fd2e963bd4 ("xscom: Don't log xscom errors caused by OPAL calls") ensured that xscom errors caused due to XSCOM read/write OPAL calls aren't logged in the error-log since the caller of the OPAL call is expected to handle it. However we are continuing to print the prerror() in the OPAL log regarding the same. This patch reduces the severity of the log from PR_ERROR to PR_INFO for the xscom read and write made via OPAL calls. Tested-by: Pavaman Subramaniyam <pavsubra@in.ibm.com> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Print info only for xscom read/writes made via opal calls Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--hw/xscom.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/hw/xscom.c b/hw/xscom.c
index 0eda567..c97740a 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -373,7 +373,16 @@ static int __xscom_read(uint32_t gcid, uint32_t pcb_addr, uint64_t *val)
if (proc_gen == proc_gen_p9 && ret == OPAL_XSCOM_CHIPLET_OFF)
return ret;
- prerror("XSCOM: Read failed, ret = %lld\n", ret);
+ /*
+ * If an OPAL call XSCOM read fails, then the OPAL-PRD will
+ * handle logging the error. Hence just print an
+ * informational message here.
+ */
+ if (this_cpu()->current_token == OPAL_XSCOM_READ)
+ prlog(PR_INFO, "XSCOM: Read failed, ret = %lld\n", ret);
+ else
+ prerror("XSCOM: Read failed, ret = %lld\n", ret);
+
return ret;
}
@@ -424,8 +433,16 @@ static int __xscom_write(uint32_t gcid, uint32_t pcb_addr, uint64_t val)
*/
if (proc_gen == proc_gen_p9 && ret == OPAL_XSCOM_CHIPLET_OFF)
return ret;
+ /*
+ * If an OPAL call XSCOM write fails, then the OPAL-PRD will
+ * handle logging the error. Hence just print an
+ * informational message here.
+ */
+ if (this_cpu()->current_token == OPAL_XSCOM_WRITE)
+ prlog(PR_INFO, "XSCOM: Write failed, ret = %lld\n", ret);
+ else
+ prerror("XSCOM: Write failed, ret = %lld\n", ret);
- prerror("XSCOM: Write failed, ret = %lld\n", ret);
return ret;
}