Message ID | 1604556290-28278-1-git-send-email-ego@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | [v2] xscom: Fix xscom error logging caused due to xscom OPAL call | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (89a32b4930be829f37e6967354a759e38048d01f) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
On Thu, 5 Nov 2020 11:34:50 +0530 "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> wrote: > From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> > > 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 calls. LGTM Reviewed-by: Dan Horák <dan@danny.cz> Dan > > Tested-by: Pavaman Subramaniyam <pavsubra@in.ibm.com> > Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> > --- > hw/xscom.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/hw/xscom.c b/hw/xscom.c > index 0eda567..8ef78aa 100644 > --- a/hw/xscom.c > +++ b/hw/xscom.c > @@ -373,7 +373,12 @@ 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 XSCOM read call fails, the OPAL-PRD will handle > + * logging the error. Hence just print an informational > + * message here. > + */ > + prlog(PR_INFO, "XSCOM: Read failed, ret = %lld\n", ret); > return ret; > } > > @@ -424,8 +429,12 @@ 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; > - > - prerror("XSCOM: Write failed, ret = %lld\n", ret); > + /* > + * If an XSCOM write call fails, the OPAL-PRD will handle > + * logging the error. Hence just print an informational > + * message here. > + */ > + prlog(PR_INFO, "XSCOM: Write failed, ret = %lld\n", ret); > return ret; > } > > -- > 1.9.4 > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot
On 11/5/20 11:34 AM, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> > > 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 calls. > > Tested-by: Pavaman Subramaniyam <pavsubra@in.ibm.com> > Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> > --- > hw/xscom.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/hw/xscom.c b/hw/xscom.c > index 0eda567..8ef78aa 100644 > --- a/hw/xscom.c > +++ b/hw/xscom.c > @@ -373,7 +373,12 @@ 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 XSCOM read call fails, the OPAL-PRD will handle > + * logging the error. Hence just print an informational > + * message here. > + */ > + prlog(PR_INFO, "XSCOM: Read failed, ret = %lld\n", ret); IIUC we want to silence errors if its generated for xscom request coming from host via OPAL API call. But this is the common function call used by OPAL internal drivers as well right? I think we will endup silencing all errors. -Vasant
diff --git a/hw/xscom.c b/hw/xscom.c index 0eda567..8ef78aa 100644 --- a/hw/xscom.c +++ b/hw/xscom.c @@ -373,7 +373,12 @@ 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 XSCOM read call fails, the OPAL-PRD will handle + * logging the error. Hence just print an informational + * message here. + */ + prlog(PR_INFO, "XSCOM: Read failed, ret = %lld\n", ret); return ret; } @@ -424,8 +429,12 @@ 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; - - prerror("XSCOM: Write failed, ret = %lld\n", ret); + /* + * If an XSCOM write call fails, the OPAL-PRD will handle + * logging the error. Hence just print an informational + * message here. + */ + prlog(PR_INFO, "XSCOM: Write failed, ret = %lld\n", ret); return ret; }