From: Michal Simek <michal.simek@xilinx.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
<linux-edac@vger.kernel.org>
Cc: <michal.simek@xilinx.com>, <rric@kernel.org>, <bp@alien8.de>,
<mchehab@kernel.org>, <tony.luck@intel.com>, <git@xilinx.com>
Subject: Re: [PATCH v2] edac: synopsys: Fix the issue in reporting of the error count
Date: Fri, 18 Mar 2022 11:33:48 +0100 [thread overview]
Message-ID: <b6821312-3aa8-6b76-81a5-45927d6cc1d0@xilinx.com> (raw)
In-Reply-To: <20220318101900.28872-1-shubhrajyoti.datta@xilinx.com>
On 3/18/22 11:19, Shubhrajyoti Datta wrote:
> Currently the error count from status register is being read which
> is not correct. Fix the issue by reading the count from the
> error count register(ERRCNT).
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
> v2:
> Remove the cumulative count change
CR number?
M
>
> drivers/edac/synopsys_edac.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
> index f05ff02c0656..1a9a5b886903 100644
> --- a/drivers/edac/synopsys_edac.c
> +++ b/drivers/edac/synopsys_edac.c
> @@ -164,6 +164,11 @@
> #define ECC_STAT_CECNT_SHIFT 8
> #define ECC_STAT_BITNUM_MASK 0x7F
>
> +/* ECC error count register definitions */
> +#define ECC_ERRCNT_UECNT_MASK 0xFFFF0000
> +#define ECC_ERRCNT_UECNT_SHIFT 16
> +#define ECC_ERRCNT_CECNT_MASK 0xFFFF
> +
> /* DDR QOS Interrupt register definitions */
> #define DDR_QOS_IRQ_STAT_OFST 0x20200
> #define DDR_QOSUE_MASK 0x4
> @@ -423,14 +428,16 @@ static int zynqmp_get_error_info(struct synps_edac_priv *priv)
> base = priv->baseaddr;
> p = &priv->stat;
>
> + regval = readl(base + ECC_ERRCNT_OFST);
> + p->ce_cnt = regval & ECC_ERRCNT_CECNT_MASK;
> + p->ue_cnt = (regval & ECC_ERRCNT_UECNT_MASK) >> ECC_ERRCNT_UECNT_SHIFT;
> + if (!p->ce_cnt)
> + goto ue_err;
> +
> regval = readl(base + ECC_STAT_OFST);
> if (!regval)
> return 1;
>
> - p->ce_cnt = (regval & ECC_STAT_CECNT_MASK) >> ECC_STAT_CECNT_SHIFT;
> - p->ue_cnt = (regval & ECC_STAT_UECNT_MASK) >> ECC_STAT_UECNT_SHIFT;
> - if (!p->ce_cnt)
> - goto ue_err;
>
> p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK);
>
next prev parent reply other threads:[~2022-03-18 10:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 10:19 [PATCH v2] edac: synopsys: Fix the issue in reporting of the error count Shubhrajyoti Datta
2022-03-18 10:33 ` Michal Simek [this message]
2022-03-18 10:41 ` Michal Simek
2022-04-14 6:29 ` Shubhrajyoti Datta
2022-04-14 8:17 ` Borislav Petkov
2022-04-14 10:29 ` Shubhrajyoti Datta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6821312-3aa8-6b76-81a5-45927d6cc1d0@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=bp@alien8.de \
--cc=git@xilinx.com \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=shubhrajyoti.datta@xilinx.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox